scripts.conditions.permission.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.
//@Condition()
Player = find("org.bukkit.entity.Player");
key = "gm";
names = ["权限(:|:)?\\s?(?.*)"];
function parameters(matcher, text) {
const permission = matcher.group("permission");
return mapOf({ permission: permission });
}
function condition(entity, map) {
if (entity == null || !(entity instanceof Player)) return true;
const permission = map.get("permission").toString();
return entity.hasPermission(permission);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy