mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-12-05 11:44:15 +01:00
Changed command execution to allow chat command catchers to be activated
This commit is contained in:
parent
726a4d7ba2
commit
5b12a9960f
@ -10,7 +10,6 @@ import org.bukkit.event.block.BlockFromToEvent;
|
||||
|
||||
public class FlowStopper implements Listener {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final AdvancedPortalsPlugin plugin;
|
||||
|
||||
// The needed config values will be stored so they are easier to access later
|
||||
|
||||
@ -462,7 +462,8 @@ public class Portal {
|
||||
boolean wasOp = player.isOp();
|
||||
try {
|
||||
player.setOp(true);
|
||||
player.performCommand(command);
|
||||
player.chat("/" + command);
|
||||
//player.performCommand(command);
|
||||
} finally {
|
||||
player.setOp(wasOp);
|
||||
}
|
||||
@ -471,12 +472,14 @@ public class Portal {
|
||||
PermissionAttachment permissionAttachment = null;
|
||||
try {
|
||||
permissionAttachment = player.addAttachment(plugin, "*", true);
|
||||
player.performCommand(command);
|
||||
player.chat("/" + command);
|
||||
//player.performCommand(command);
|
||||
} finally {
|
||||
player.removeAttachment(permissionAttachment);
|
||||
}
|
||||
} else {
|
||||
player.performCommand(command);
|
||||
player.chat("/" + command);
|
||||
//player.performCommand(command);
|
||||
}
|
||||
command = portal.getArg("command." + ++commandLine);
|
||||
} while (command != null);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user