mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-28 02:54:17 +00:00
Update WorldListener.java
This commit is contained in:
parent
e2b3488aa7
commit
a0471e63f6
1 changed files with 3 additions and 2 deletions
|
@ -112,7 +112,8 @@ public class WorldListener extends PlexListener
|
|||
boolean isFaweCommand = command instanceof PluginIdentifiableCommand && ((PluginIdentifiableCommand) command).getPlugin().equals(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit"));
|
||||
if (isWeCommand || isFaweCommand || EDIT_COMMANDS.contains(message.toLowerCase()))
|
||||
{
|
||||
event.getPlayer().sendMessage(Component.text("You do not have permission to use that command in this world.").color(NamedTextColor.RED));
|
||||
String noEdit = plugin.config.getString("worlds." + event.getPlayer().getWorld().getName().toLowerCase() + ".modification.message");
|
||||
event.getPlayer().sendMessage(MiniMessage.miniMessage().deserialize(noEdit));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -183,4 +184,4 @@ public class WorldListener extends PlexListener
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue