mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 00:57:37 +00:00
Plex 1.0.3
This commit is contained in:
parent
c3a426d6db
commit
2cde4a430c
@ -58,7 +58,7 @@ dependencies {
|
||||
}
|
||||
|
||||
group = "dev.plex"
|
||||
version = "1.1-SNAPSHOT"
|
||||
version = "1.0.3"
|
||||
description = "Plex"
|
||||
|
||||
shadowJar {
|
||||
|
@ -32,6 +32,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class WorldListener extends PlexListener
|
||||
{
|
||||
private final List<String> EDIT_COMMANDS = Arrays.asList("bigtree", "ebigtree", "largetree", "elargetree",
|
||||
"break", "ebreak", "antioch", "nuke", "editsign", "tree", "etree");
|
||||
|
||||
@EventHandler
|
||||
public void onBlockPlace(BlockPlaceEvent e)
|
||||
{
|
||||
@ -76,10 +79,11 @@ public class WorldListener extends PlexListener
|
||||
if (command != null)
|
||||
{
|
||||
// This does check for aliases
|
||||
boolean isWeCommand = command instanceof PluginIdentifiableCommand && ((PluginIdentifiableCommand)command).getPlugin().equals(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit"));
|
||||
if (isWeCommand)
|
||||
boolean isWeCommand = command instanceof PluginIdentifiableCommand && ((PluginIdentifiableCommand)command).getPlugin().equals(Bukkit.getPluginManager().getPlugin("WorldEdit"));
|
||||
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 WorldEdit in this world!").color(NamedTextColor.RED));
|
||||
event.getPlayer().sendMessage(Component.text("You do not have permission to use that command in this world.").color(NamedTextColor.RED));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user