Updated for 1.8.6.

Code cleanup.
Fixed permissions.
This commit is contained in:
NavidK0
2015-05-30 09:34:38 -04:00
parent 17869698d5
commit 545fa08e55
27 changed files with 170 additions and 87 deletions

View File

@@ -55,6 +55,7 @@ public class DisguiseCloneCommand extends BaseDisguiseCommand {
/**
* Send the player the information
*/
@Override
protected void sendCommandUsage(CommandSender sender, HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> map) {
sender.sendMessage(ChatColor.DARK_GREEN
+ "Right click a entity to get a disguise reference you can pass to other disguise commands!");

View File

@@ -56,6 +56,7 @@ public class DisguiseCommand extends BaseDisguiseCommand {
/**
* Send the player the information
*/
@Override
protected void sendCommandUsage(CommandSender sender, HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> map) {
ArrayList<String> allowedDisguises = getAllowedDisguises(map);
sender.sendMessage(ChatColor.DARK_GREEN + "Choose a disguise to become the disguise!");

View File

@@ -63,7 +63,7 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
}
}
private ArrayList<EnumHelp> enumHelp = new ArrayList<EnumHelp>();
private ArrayList<EnumHelp> enumHelp = new ArrayList<>();
public DisguiseHelpCommand() {
try {
@@ -97,7 +97,7 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
} catch (Exception ex) {
}
try {
ArrayList<String> enumReturns = new ArrayList<String>();
ArrayList<String> enumReturns = new ArrayList<>();
for (PotionEffectType potionType : PotionEffectType.values()) {
if (potionType != null)
enumReturns.add(toReadable(potionType.getName()) + ChatColor.RED + "(" + ChatColor.GREEN + potionType.getId()
@@ -159,8 +159,8 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
sender.sendMessage(ChatColor.RED + "You do not have permission for that disguise!");
return true;
}
ArrayList<String> methods = new ArrayList<String>();
HashMap<String, ChatColor> map = new HashMap<String, ChatColor>();
ArrayList<String> methods = new ArrayList<>();
HashMap<String, ChatColor> map = new HashMap<>();
Class watcher = type.getWatcherClass();
int ignored = 0;
try {
@@ -260,6 +260,7 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
/**
* Send the player the information
*/
@Override
protected void sendCommandUsage(CommandSender sender, HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> map) {
sender.sendMessage(ChatColor.RED
+ "/disguisehelp <DisguiseType> "

View File

@@ -79,6 +79,7 @@ public class DisguisePlayerCommand extends BaseDisguiseCommand {
/**
* Send the player the information
*/
@Override
protected void sendCommandUsage(CommandSender sender, HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> map) {
ArrayList<String> allowedDisguises = getAllowedDisguises(map);
sender.sendMessage(ChatColor.DARK_GREEN + "Disguise another player!");

View File

@@ -22,7 +22,7 @@ import org.bukkit.entity.Player;
public class DisguiseRadiusCommand extends BaseDisguiseCommand {
private int maxRadius = 30;
private ArrayList<Class> validClasses = new ArrayList<Class>();
private ArrayList<Class> validClasses = new ArrayList<>();
public DisguiseRadiusCommand(int maxRadius) {
this.maxRadius = maxRadius;
@@ -49,7 +49,7 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand {
return true;
}
if (args[0].equalsIgnoreCase("entitytype") || args[0].equalsIgnoreCase("entitytypes")) {
ArrayList<String> classes = new ArrayList<String>();
ArrayList<String> classes = new ArrayList<>();
for (Class c : validClasses) {
classes.add(c.getSimpleName());
}
@@ -149,6 +149,7 @@ public class DisguiseRadiusCommand extends BaseDisguiseCommand {
/**
* Send the player the information
*/
@Override
protected void sendCommandUsage(CommandSender sender, HashMap<DisguiseType, HashMap<ArrayList<String>, Boolean>> map) {
ArrayList<String> allowedDisguises = getAllowedDisguises(map);
sender.sendMessage(ChatColor.DARK_GREEN + "Disguise all entities in a radius! Caps at 30 blocks!");