scripts.conditions.ground.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
The newest version!
//@Condition()
Coerce = static("Coerce");
key = "ground";
names = ["要求在地面", "要求不在地面"];
function parameters(matcher, text) {
const isIn = !matcher.pattern().toString().contains("不");
return mapOf({ status: isIn });
}
function condition(entity, map) {
if (entity == null) return true;
const isIn = Coerce.toBoolean(map.get("status"));
return (isIn && entity.isOnGround()) || (!isIn && !entity.isOnGround());
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy