Patch locate overwrite

This commit is contained in:
CocoTheOwner 2021-03-06 16:18:13 +01:00
parent f5fed50e4d
commit b6d8771792

View File

@ -25,8 +25,7 @@ public class CommandLocate extends MortarCommand implements Listener
} }
if (event.getMessage().contains("/locate")) { if (event.getMessage().contains("/locate")) {
event.setCancelled(true); // Cancel the vanilla command process event.setCancelled(true); // Cancel the vanilla command process
event.getPlayer().sendMessage("/locate command overwritten in Iris worlds. Ran /ir std goto instead"); String command = event.getMessage().replace("/locate", "ir std goto");
String command = event.getMessage().replace("/locate", "/ir std goto");
Bukkit.dispatchCommand(event.getPlayer(), command); Bukkit.dispatchCommand(event.getPlayer(), command);
} }
} }