scripts.conditions.level.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()
Player = find("org.bukkit.entity.Player");
Coerce = static("Coerce");
key = "level";
names = ["Lv.(?\\d+)", "等级限制:\\s?(?d+)"];
function parameters(matcher, text) {
const value = Coerce.toInteger(matcher.group("value"));
return mapOf({ value: value });
}
function condition(entity, map) {
if (entity == null || !(entity instanceof Player)) return true;
const level = Coerce.toInteger(map.get("value"));
return entity.level >= level;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy