1
0
Эх сурвалжийг харах

Added check to see if a player is using the atm command

RadBuilder 6 жил өмнө
parent
commit
ed0d01f28c

+ 4 - 0
Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java

@@ -378,6 +378,10 @@ public class ATM implements Listener, CommandExecutor {
 	
 	@Override
 	public boolean onCommand(CommandSender cs, Command arg1, String arg2, String[] args) {
+		if (!(cs instanceof Player)){
+			cs.sendMessage("Only players can use atms.");
+			return true;
+		}
 		if (args.length == 0) {
 			if (cs.hasPermission("tim.use")) {
 				openGUI((Player) cs);