+ Added beginning support for RPG Items

* Fixed ticket 183
* Fixed ticket 193
* Fixed ticket 187
This commit is contained in:
Zino 2013-10-15 22:16:36 +02:00
parent ec48680b3a
commit 767ae3030a
5 changed files with 97 additions and 88 deletions

BIN
lib/rpgitems.jar Normal file

Binary file not shown.

View File

@ -68,6 +68,13 @@
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/lib/EpicBossRecoded.jar</systemPath> <systemPath>${project.basedir}/lib/EpicBossRecoded.jar</systemPath>
</dependency> </dependency>
<dependency>
<groupId>think.rpgitems</groupId>
<artifactId>rpgitems</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/rpgitems.jar</systemPath>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1147,7 +1147,7 @@ public class Quester {
} else if (objective.equalsIgnoreCase("killNPC")) { } else if (objective.equalsIgnoreCase("killNPC")) {
String message = ChatColor.GREEN + "(Completed) Kill " + npc.getName(); String message = ChatColor.GREEN + "(Completed) Kill " + npc.getName();
message = message + " " + currentStage.citizenNumToKill.get(currentStage.citizensToKill.indexOf(npc)) + "/" + currentStage.citizenNumToKill.get(currentStage.citizensToKill.indexOf(npc)); message = message + " " + currentStage.citizenNumToKill.get(currentStage.citizensToKill.indexOf(npc.getId())) + "/" + currentStage.citizenNumToKill.get(currentStage.citizensToKill.indexOf(npc.getId()));
p.sendMessage(message); p.sendMessage(message);
if (testComplete()) { if (testComplete()) {
currentQuest.nextStage(this); currentQuest.nextStage(this);

View File

@ -70,6 +70,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
public static Permission permission = null; public static Permission permission = null;
public static mcMMO mcmmo = null; public static mcMMO mcmmo = null;
public static EpicBoss epicBoss = null; public static EpicBoss epicBoss = null;
public static think.rpgitems.Plugin rpgItems = null;
public static boolean snoop = true; public static boolean snoop = true;
public static boolean npcEffects = true; public static boolean npcEffects = true;
public static boolean broadcastPartyCreation = true; public static boolean broadcastPartyCreation = true;
@ -157,6 +158,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
getServer().getPluginManager().registerEvents(bossListener, this); getServer().getPluginManager().registerEvents(bossListener, this);
} }
if (getServer().getPluginManager().getPlugin("RPG Items") != null) {
rpgItems = think.rpgitems.Plugin.plugin;
}
if (!setupEconomy()) { if (!setupEconomy()) {
printWarning("[Quests] Economy not found."); printWarning("[Quests] Economy not found.");
} }
@ -428,7 +433,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} }
@Override @Override
public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args) { public boolean onCommand(final CommandSender cs, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("quest")) { if (cmd.getName().equalsIgnoreCase("quest")) {
@ -1027,8 +1032,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else if (cmd.getName().equalsIgnoreCase("questadmin")) { } else if (cmd.getName().equalsIgnoreCase("questadmin")) {
if (cs instanceof Player || args.length == 1 && args[0].equalsIgnoreCase("reload")) {
final Player player; final Player player;
if (cs instanceof Player) { if (cs instanceof Player) {
player = (Player) cs; player = (Player) cs;
@ -1038,10 +1041,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (args.length == 0) { if (args.length == 0) {
if (player.hasPermission("quests.admin")) { if (player == null || player.hasPermission("quests.admin")) {
printAdminHelp(player); printAdminHelp(cs);
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args.length == 1) { } else if (args.length == 1) {
@ -1066,7 +1069,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (args[0].equalsIgnoreCase("quit")) { if (args[0].equalsIgnoreCase("quit")) {
if (player.hasPermission("quests.admin.quit")) { if (player == null || player.hasPermission("quests.admin.quit")) {
Player target = null; Player target = null;
@ -1081,21 +1084,21 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
Quester quester = getQuester(target.getName()); Quester quester = getQuester(target.getName());
if (quester.currentQuest == null) { if (quester.currentQuest == null) {
player.sendMessage(YELLOW + target.getName() + " does not currently have an active Quest."); cs.sendMessage(YELLOW + target.getName() + " does not currently have an active Quest.");
} else { } else {
quester.resetObjectives(); quester.resetObjectives();
quester.currentStage = null; quester.currentStage = null;
player.sendMessage(GREEN + target.getName() + GOLD + " has forcibly quit the Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); cs.sendMessage(GREEN + target.getName() + GOLD + " has forcibly quit the Quest " + PURPLE + quester.currentQuest.name + GOLD + ".");
target.sendMessage(GREEN + player.getName() + GOLD + " has forced you to quit the Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " has forced you to quit the Quest " + PURPLE + quester.currentQuest.name + GOLD + ".");
quester.currentQuest = null; quester.currentQuest = null;
quester.saveData(); quester.saveData();
@ -1106,13 +1109,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args[0].equalsIgnoreCase("nextstage")) { } else if (args[0].equalsIgnoreCase("nextstage")) {
if (player.hasPermission("quests.admin.nextstage")) { if (player == null || player.hasPermission("quests.admin.nextstage")) {
Player target = null; Player target = null;
@ -1127,19 +1130,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
Quester quester = getQuester(target.getName()); Quester quester = getQuester(target.getName());
if (quester.currentQuest == null) { if (quester.currentQuest == null) {
player.sendMessage(YELLOW + target.getName() + " does not currently have an active Quest."); cs.sendMessage(YELLOW + target.getName() + " does not currently have an active Quest.");
} else { } else {
player.sendMessage(GREEN + target.getName() + GOLD + " has advanced to the next Stage in the Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); cs.sendMessage(GREEN + target.getName() + GOLD + " has advanced to the next Stage in the Quest " + PURPLE + quester.currentQuest.name + GOLD + ".");
target.sendMessage(GREEN + player.getName() + GOLD + " has advanced you to the next Stage in your Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " has advanced you to the next Stage in your Quest " + PURPLE + quester.currentQuest.name + GOLD + ".");
quester.currentQuest.nextStage(quester); quester.currentQuest.nextStage(quester);
quester.saveData(); quester.saveData();
@ -1150,13 +1153,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args[0].equalsIgnoreCase("finish")) { } else if (args[0].equalsIgnoreCase("finish")) {
if (player.hasPermission("quests.admin.finish")) { if (player == null || player.hasPermission("quests.admin.finish")) {
Player target = null; Player target = null;
@ -1171,19 +1174,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
Quester quester = getQuester(target.getName()); Quester quester = getQuester(target.getName());
if (quester.currentQuest == null) { if (quester.currentQuest == null) {
player.sendMessage(YELLOW + target.getName() + " does not currently have an active Quest."); cs.sendMessage(YELLOW + target.getName() + " does not currently have an active Quest.");
} else { } else {
player.sendMessage(GREEN + target.getName() + GOLD + " has advanced to the next Stage in the Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); cs.sendMessage(GREEN + target.getName() + GOLD + " has advanced to the next Stage in the Quest " + PURPLE + quester.currentQuest.name + GOLD + ".");
target.sendMessage(GREEN + player.getName() + GOLD + " has advanced you to the next Stage in your Quest " + PURPLE + quester.currentQuest.name + GOLD + "."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " has advanced you to the next Stage in your Quest " + PURPLE + quester.currentQuest.name + GOLD + ".");
quester.currentQuest.completeQuest(quester); quester.currentQuest.completeQuest(quester);
quester.saveData(); quester.saveData();
@ -1194,13 +1197,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args[0].equalsIgnoreCase("pointsall")) { } else if (args[0].equalsIgnoreCase("pointsall")) {
if (player.hasPermission("quests.admin.points.all")) { if (player == null || player.hasPermission("quests.admin.points.all")) {
final int amount; final int amount;
@ -1209,12 +1212,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
amount = Integer.parseInt(args[1]); amount = Integer.parseInt(args[1]);
if (amount < 0) { if (amount < 0) {
player.sendMessage(RED + "Error: Amount cannot be less than zero!"); cs.sendMessage(RED + "Error: Amount cannot be less than zero!");
return true; return true;
} }
} catch (Exception e) { } catch (Exception e) {
player.sendMessage(RED + "Error: Input was not a number!"); cs.sendMessage(RED + "Error: Input was not a number!");
return true; return true;
} }
@ -1240,9 +1243,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} catch (Exception e) { } catch (Exception e) {
if (failCount < 4) { if (failCount < 4) {
player.sendMessage(RED + "Error reading " + DARKAQUA + f.getName() + RED + ", skipping.."); cs.sendMessage(RED + "Error reading " + DARKAQUA + f.getName() + RED + ", skipping..");
} else if (suppressed == false) { } else if (suppressed == false) {
player.sendMessage(RED + "Error reading " + DARKAQUA + f.getName() + RED + ", suppressing further errors."); cs.sendMessage(RED + "Error reading " + DARKAQUA + f.getName() + RED + ", suppressing further errors.");
suppressed = true; suppressed = true;
} }
@ -1250,17 +1253,17 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} }
player.sendMessage(GREEN + "Done."); cs.sendMessage(GREEN + "Done.");
getServer().broadcastMessage(YELLOW + "[Quests] " + GOLD + "All players' Quest Points have been set to " + AQUA + amount + GOLD + "!"); getServer().broadcastMessage(YELLOW + "[Quests] " + GOLD + "All players' Quest Points have been set to " + AQUA + amount + GOLD + "!");
} else { } else {
player.sendMessage(RED + "Error: Unable to read Quests data folder!"); cs.sendMessage(RED + "Error: Unable to read Quests data folder!");
} }
} }
}); });
player.sendMessage(YELLOW + "Setting all players' Quest Points..."); cs.sendMessage(YELLOW + "Setting all players' Quest Points...");
for (Quester q : questers.values()) { for (Quester q : questers.values()) {
q.questPoints = amount; q.questPoints = amount;
@ -1270,7 +1273,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
@ -1284,7 +1287,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (args[0].equalsIgnoreCase("give")) { if (args[0].equalsIgnoreCase("give")) {
if (player.hasPermission("quests.admin.give")) { if (player == null || player.hasPermission("quests.admin.give")) {
Player target = null; Player target = null;
@ -1299,7 +1302,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
@ -1353,7 +1356,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (questToGive == null) { if (questToGive == null) {
player.sendMessage(YELLOW + "Quest not found."); cs.sendMessage(YELLOW + "Quest not found.");
} else { } else {
@ -1364,8 +1367,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
quester.currentQuest = questToGive; quester.currentQuest = questToGive;
quester.currentStage = questToGive.stages.getFirst(); quester.currentStage = questToGive.stages.getFirst();
quester.addEmpties(); quester.addEmpties();
player.sendMessage(GREEN + target.getName() + GOLD + " has forcibly started the Quest " + PURPLE + questToGive.name + GOLD + "."); cs.sendMessage(GREEN + target.getName() + GOLD + " has forcibly started the Quest " + PURPLE + questToGive.name + GOLD + ".");
target.sendMessage(GREEN + player.getName() + GOLD + " has forced you to take the Quest " + PURPLE + questToGive.name + GOLD + "."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " has forced you to take the Quest " + PURPLE + questToGive.name + GOLD + ".");
target.sendMessage(GOLD + "---(Objectives)---"); target.sendMessage(GOLD + "---(Objectives)---");
for (String s : quester.getObjectives()) { for (String s : quester.getObjectives()) {
target.sendMessage(s); target.sendMessage(s);
@ -1379,13 +1382,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args[0].equalsIgnoreCase("points")) { } else if (args[0].equalsIgnoreCase("points")) {
if (player.hasPermission("quests.admin.points")) { if (player == null || player.hasPermission("quests.admin.points")) {
Player target = null; Player target = null;
@ -1400,7 +1403,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
@ -1412,15 +1415,15 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} catch (Exception e) { } catch (Exception e) {
player.sendMessage(YELLOW + "Amount must be a number."); cs.sendMessage(YELLOW + "Amount must be a number.");
return true; return true;
} }
Quester quester = getQuester(target.getName()); Quester quester = getQuester(target.getName());
quester.questPoints = points; quester.questPoints = points;
player.sendMessage(GREEN + target.getName() + GOLD + "\'s Quest Points have been set to " + PURPLE + points + GOLD + "."); cs.sendMessage(GREEN + target.getName() + GOLD + "\'s Quest Points have been set to " + PURPLE + points + GOLD + ".");
target.sendMessage(GREEN + player.getName() + GOLD + " has set your Quest Points to " + PURPLE + points + GOLD + "."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " has set your Quest Points to " + PURPLE + points + GOLD + ".");
quester.saveData(); quester.saveData();
@ -1428,13 +1431,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args[0].equalsIgnoreCase("takepoints")) { } else if (args[0].equalsIgnoreCase("takepoints")) {
if (player.hasPermission("quests.admin.takepoints")) { if (player == null || player.hasPermission("quests.admin.takepoints")) {
Player target = null; Player target = null;
@ -1449,7 +1452,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
@ -1461,15 +1464,15 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} catch (Exception e) { } catch (Exception e) {
player.sendMessage(YELLOW + "Amount must be a number."); cs.sendMessage(YELLOW + "Amount must be a number.");
return true; return true;
} }
Quester quester = getQuester(target.getName()); Quester quester = getQuester(target.getName());
quester.questPoints -= Math.abs(points); quester.questPoints -= Math.abs(points);
player.sendMessage(GOLD + "Took away " + PURPLE + points + GOLD + " Quest Points from " + GREEN + target.getName() + GOLD + "\'s."); cs.sendMessage(GOLD + "Took away " + PURPLE + points + GOLD + " Quest Points from " + GREEN + target.getName() + GOLD + "\'s.");
target.sendMessage(GREEN + player.getName() + GOLD + " took away " + PURPLE + points + GOLD + " Quest Points."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " took away " + PURPLE + points + GOLD + " Quest Points.");
quester.saveData(); quester.saveData();
@ -1477,11 +1480,11 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else if (args[0].equalsIgnoreCase("givepoints")) { } else if (args[0].equalsIgnoreCase("givepoints")) {
if (player.hasPermission("quests.admin.givepoints")) { if (player == null || player.hasPermission("quests.admin.givepoints")) {
Player target = null; Player target = null;
@ -1496,7 +1499,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
if (target == null) { if (target == null) {
player.sendMessage(YELLOW + "Player not found."); cs.sendMessage(YELLOW + "Player not found.");
} else { } else {
@ -1508,15 +1511,15 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} catch (Exception e) { } catch (Exception e) {
player.sendMessage(YELLOW + "Amount must be a number."); cs.sendMessage(YELLOW + "Amount must be a number.");
return true; return true;
} }
Quester quester = getQuester(target.getName()); Quester quester = getQuester(target.getName());
quester.questPoints += Math.abs(points); quester.questPoints += Math.abs(points);
player.sendMessage(GOLD + "Gave " + PURPLE + points + GOLD + " Quest Points to " + GREEN + target.getName() + GOLD + "\'s."); cs.sendMessage(GOLD + "Gave " + PURPLE + points + GOLD + " Quest Points to " + GREEN + target.getName() + GOLD + "\'s.");
target.sendMessage(GREEN + player.getName() + GOLD + " gave you " + PURPLE + points + GOLD + " Quest Points."); target.sendMessage(GREEN + ((player == null) ? "console" : player.getName()) + GOLD + " gave you " + PURPLE + points + GOLD + " Quest Points.");
quester.saveData(); quester.saveData();
@ -1524,7 +1527,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else { } else {
player.sendMessage(RED + "You do not have access to that command."); cs.sendMessage(RED + "You do not have access to that command.");
} }
} else { } else {
@ -1535,12 +1538,6 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} }
} else {
cs.sendMessage(YELLOW + "This command may only be performed in-game.");
}
return true; return true;
} }
@ -1550,37 +1547,37 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} }
public void printAdminHelp(Player player) { public void printAdminHelp(CommandSender cs) {
player.sendMessage(RED + "- " + DARKRED + "Questadmin" + RED + " -"); cs.sendMessage(RED + "- " + DARKRED + "Questadmin" + RED + " -");
player.sendMessage(""); cs.sendMessage("");
player.sendMessage(DARKRED + "/questadmin" + RED + " - View Questadmin help"); cs.sendMessage(DARKRED + "/questadmin" + RED + " - View Questadmin help");
if (player.hasPermission("quests.admin.give")) { if (cs.hasPermission("quests.admin.give")) {
player.sendMessage(DARKRED + "/questadmin give <player> <quest>" + RED + " - Force a player to take a Quest"); cs.sendMessage(DARKRED + "/questadmin give <player> <quest>" + RED + " - Force a player to take a Quest");
} }
if (player.hasPermission("quests.admin.quit")) { if (cs.hasPermission("quests.admin.quit")) {
player.sendMessage(DARKRED + "/questadmin quit <player>" + RED + " - Force a player to quit their Quest"); cs.sendMessage(DARKRED + "/questadmin quit <player>" + RED + " - Force a player to quit their Quest");
} }
if (player.hasPermission("quests.admin.points")) { if (cs.hasPermission("quests.admin.points")) {
player.sendMessage(DARKRED + "/questadmin points <player> <amount>" + RED + " - Set a players Quest Points"); cs.sendMessage(DARKRED + "/questadmin points <player> <amount>" + RED + " - Set a players Quest Points");
} }
if (player.hasPermission("quests.admin.takepoints")) { if (cs.hasPermission("quests.admin.takepoints")) {
player.sendMessage(DARKRED + "/questadmin takepoints <player> <amount>" + RED + " - Take a players Quest Points"); cs.sendMessage(DARKRED + "/questadmin takepoints <player> <amount>" + RED + " - Take a players Quest Points");
} }
if (player.hasPermission("quests.admin.givepoints")) { if (cs.hasPermission("quests.admin.givepoints")) {
player.sendMessage(DARKRED + "/questadmin givepoints <player> <amount>" + RED + " - Give a player Quest Points"); cs.sendMessage(DARKRED + "/questadmin givepoints <player> <amount>" + RED + " - Give a player Quest Points");
} }
if (player.hasPermission("quests.admin.pointsall")) { if (cs.hasPermission("quests.admin.pointsall")) {
player.sendMessage(DARKRED + "/questadmin pointsall <amount>" + RED + " - Set ALL players' Quest Points"); cs.sendMessage(DARKRED + "/questadmin pointsall <amount>" + RED + " - Set ALL players' Quest Points");
} }
if (player.hasPermission("quests.admin.finish")) { if (cs.hasPermission("quests.admin.finish")) {
player.sendMessage(DARKRED + "/questadmin finish <player>" + RED + " - Immediately force Quest completion for a player"); cs.sendMessage(DARKRED + "/questadmin finish <player>" + RED + " - Immediately force Quest completion for a player");
} }
if (player.hasPermission("quests.admin.nextstage")) { if (cs.hasPermission("quests.admin.nextstage")) {
player.sendMessage(DARKRED + "/questadmin nextstage <player>" + RED + " - Immediately force Stage completion for a player"); cs.sendMessage(DARKRED + "/questadmin nextstage <player>" + RED + " - Immediately force Stage completion for a player");
} }
if (player.hasPermission("quests.admin.reload")) { if (cs.hasPermission("quests.admin.reload")) {
player.sendMessage(DARKRED + "/questadmin reload" + RED + " - Reload all Quests"); cs.sendMessage(DARKRED + "/questadmin reload" + RED + " - Reload all Quests");
} }
} }

View File

@ -213,8 +213,13 @@ public class QuestMob {
QuestMob other = (QuestMob) o; QuestMob other = (QuestMob) o;
if (name != null && other.name != null) {
if (name.equalsIgnoreCase(other.name) == false) if (name.equalsIgnoreCase(other.name) == false)
return false; return false;
} else if (name == null && other.name == null) {
} else {
return false;
}
if (entityType != other.entityType) if (entityType != other.entityType)
return false; return false;