3
0
Mirror von https://github.com/St3venAU/ArmorStandTools.git synchronisiert 2024-12-28 20:40:12 +01:00

Update MainListener.java

Dieser Commit ist enthalten in:
Corentin Boiteau 2019-11-17 16:52:34 +01:00 committet von GitHub
Ursprung f7117a8ddc
Commit bf549ee223
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -52,6 +52,23 @@ public class MainListener implements Listener {
this.plugin = main;
}
@EventHandler(ignoreCancelled = true)
public void onCommandProcess(PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();
if (!plugin.carryingArmorStand.containsKey(player.getUniqueId()))
return;
String command = event.getMessage().split(" ")[0].toLowerCase();
for (String block : Config.commandsBlocked) {
if (!command.contains(block))
continue;
player.sendMessage(ChatColor.RED + Config.commandBlocked);
event.setCancelled(true);
return;
}
}
@EventHandler
public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent event) {
if(event.getRightClicked() instanceof ArmorStand) {