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();
|
GDTimings.PLAYER_COMMAND_EVENT.stopTimingIfSync();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String commandPermission = pluginId + "." + command;
|
|
||||||
|
String commandTarget = pluginId + ":" + command;
|
||||||
|
|
||||||
// first check the args
|
// first check the args
|
||||||
String argument = "";
|
|
||||||
for (String arg : args) {
|
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())) {
|
if (GDFlags.COMMAND_EXECUTE && !commandExecuteSourceBlacklisted) {
|
||||||
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, player.getLocation(), claim, GDPermissions.COMMAND_EXECUTE, event.getSource(), commandPermission + argument, player);
|
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, player.getLocation(), claim, GDPermissions.COMMAND_EXECUTE, event.getSource(), commandTarget, player);
|
||||||
if (result == Tristate.TRUE) {
|
if (result == Tristate.TRUE) {
|
||||||
GDTimings.PLAYER_COMMAND_EVENT.stopTimingIfSync();
|
GDTimings.PLAYER_COMMAND_EVENT.stopTimingIfSync();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user