mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-12 10:44:42 +01:00
Fix command-execute flag.
This commit is contained in:
parent
f2a13b9539
commit
d81c21955c
@ -281,16 +281,18 @@ public void onPlayerCommand(SendCommandEvent event, @First Player player) {
|
||||
GDTimings.PLAYER_COMMAND_EVENT.stopTimingIfSync();
|
||||
return;
|
||||
}
|
||||
String commandPermission = pluginId + "." + command;
|
||||
|
||||
String commandTarget = pluginId + ":" + command;
|
||||
|
||||
// first check the args
|
||||
String argument = "";
|
||||
for (String arg : args) {
|
||||
argument = argument + "." + arg;
|
||||
if (!arg.isEmpty()) {
|
||||
commandTarget = commandTarget + "." + arg;
|
||||
}
|
||||
}
|
||||
|
||||
if (GDFlags.COMMAND_EXECUTE && !commandExecuteSourceBlacklisted && !GriefDefenderPlugin.isTargetIdBlacklisted(Flags.COMMAND_EXECUTE.getName(), commandPermission + argument, player.getWorld().getProperties())) {
|
||||
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, player.getLocation(), claim, GDPermissions.COMMAND_EXECUTE, event.getSource(), commandPermission + argument, player);
|
||||
if (GDFlags.COMMAND_EXECUTE && !commandExecuteSourceBlacklisted) {
|
||||
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, player.getLocation(), claim, GDPermissions.COMMAND_EXECUTE, event.getSource(), commandTarget, player);
|
||||
if (result == Tristate.TRUE) {
|
||||
GDTimings.PLAYER_COMMAND_EVENT.stopTimingIfSync();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user