Update WorldListener.java

This commit is contained in:
Deauthorized 2024-05-02 17:42:33 -04:00 committed by GitHub
parent e2b3488aa7
commit a0471e63f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,8 @@ public class WorldListener extends PlexListener
boolean isFaweCommand = command instanceof PluginIdentifiableCommand && ((PluginIdentifiableCommand) command).getPlugin().equals(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit")); boolean isFaweCommand = command instanceof PluginIdentifiableCommand && ((PluginIdentifiableCommand) command).getPlugin().equals(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit"));
if (isWeCommand || isFaweCommand || EDIT_COMMANDS.contains(message.toLowerCase())) 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); event.setCancelled(true);
} }
} }
@ -183,4 +184,4 @@ public class WorldListener extends PlexListener
} }
return false; return false;
} }
} }