mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-23 16:41:42 +01:00
Lowers priority of banned command listener to catch before other plugins
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1103
This commit is contained in:
parent
28200a44a8
commit
c385ee78f5
@ -32,7 +32,7 @@ public class BannedCommands implements Listener {
|
|||||||
* Prevents visitors from using commands on islands, like /spawner
|
* Prevents visitors from using commands on islands, like /spawner
|
||||||
* @param e - event
|
* @param e - event
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onVisitorCommand(PlayerCommandPreprocessEvent e) {
|
public void onVisitorCommand(PlayerCommandPreprocessEvent e) {
|
||||||
if (!plugin.getIWM().inWorld(e.getPlayer().getLocation()) || e.getPlayer().isOp()
|
if (!plugin.getIWM().inWorld(e.getPlayer().getLocation()) || e.getPlayer().isOp()
|
||||||
|| e.getPlayer().hasPermission(plugin.getIWM().getPermissionPrefix(e.getPlayer().getWorld()) + "mod.bypassprotect")
|
|| e.getPlayer().hasPermission(plugin.getIWM().getPermissionPrefix(e.getPlayer().getWorld()) + "mod.bypassprotect")
|
||||||
@ -53,7 +53,7 @@ public class BannedCommands implements Listener {
|
|||||||
* Prevents falling players from using commands, like /warp
|
* Prevents falling players from using commands, like /warp
|
||||||
* @param e - event
|
* @param e - event
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onFallingCommand(PlayerCommandPreprocessEvent e) {
|
public void onFallingCommand(PlayerCommandPreprocessEvent e) {
|
||||||
if (!plugin.getIWM().inWorld(e.getPlayer().getLocation()) || e.getPlayer().isOp()
|
if (!plugin.getIWM().inWorld(e.getPlayer().getLocation()) || e.getPlayer().isOp()
|
||||||
|| e.getPlayer().hasPermission(plugin.getIWM().getPermissionPrefix(e.getPlayer().getWorld()) + "mod.bypassprotect")
|
|| e.getPlayer().hasPermission(plugin.getIWM().getPermissionPrefix(e.getPlayer().getWorld()) + "mod.bypassprotect")
|
||||||
|
Loading…
Reference in New Issue
Block a user