Minestom
Minestom copied to clipboard
Add a way to override hasPermission method
Permission manager plugins needs to override hasPermission method.
Can be used like any other events:
public void handlePlayerCheckPermissionEvent(PlayerCheckPermissionEvent event) {
boolean hasPermission = event.hasPermission();
if (hasPermission)
return;
final Player player = event.getPlayer();
// Your behavior
event.setHasPermission(/* true or false */);
}
I did something similar but for PermissionHandler
#1138
Man, it's old now.
@LoisDuplain you should probably address the issues i commented on if you still want this merged (though no guarantee it even will be, since no contributors have commented on this yet)