mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-08-03 04:55:27 +02:00
General changes
This commit is contained in:
@@ -298,7 +298,7 @@ public abstract class Command {
|
||||
MainCommand.getInstance().help.execute(player, args, null, null);
|
||||
return;
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
}
|
||||
// Command recommendation
|
||||
MainUtil.sendMessage(player, C.NOT_VALID_SUBCOMMAND);
|
||||
|
@@ -1,31 +0,0 @@
|
||||
package com.plotsquared.general.commands;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class CommandHandlingOutput {
|
||||
|
||||
public static int CALLER_OF_WRONG_TYPE = -6;
|
||||
public static int NOT_COMMAND = -5;
|
||||
public static int NOT_FOUND = -4;
|
||||
public static int NOT_PERMITTED = -3;
|
||||
public static int ERROR = -2;
|
||||
public static int WRONG_USAGE = -1;
|
||||
|
||||
public static int SUCCESS = 1;
|
||||
|
||||
public static String nameField(int code) {
|
||||
Field[] fields = CommandHandlingOutput.class.getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
if (field.getGenericType() == Integer.TYPE) {
|
||||
try {
|
||||
if ((Integer) field.get(CommandHandlingOutput.class) == code) {
|
||||
return field.getName();
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return "null??";
|
||||
}
|
||||
}
|
@@ -84,7 +84,7 @@ public class WESubscriber {
|
||||
if (tool instanceof BrushTool) {
|
||||
hasMask = ((BrushTool) tool).getMask() != null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
AbstractDelegateExtent extent = (AbstractDelegateExtent) event.getExtent();
|
||||
|
Reference in New Issue
Block a user