Switching to Conversation API (unfinished)

This commit is contained in:
Blackvein 2012-10-12 12:14:34 -07:00
parent 2fae0182a6
commit 0885806182
5 changed files with 267 additions and 166 deletions

View File

@ -7,4 +7,6 @@
- item-amounts: list of integers Item amounts to give to the player
- Added quest item requirement
- remove-items: list of true/false Should the item requirements be removed from the players inventory?
- remove-items: list of true/false Should the item requirements be removed from the players inventory?
- Added catches/printout messages for all quest-reading errors

View File

@ -263,7 +263,7 @@ public class Event {
if(data.isBoolean(eventKey + "clear-inventory"))
event.clearInv = data.getBoolean(eventKey + "clear-inventory");
else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "clear-inventory: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a true/false value!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "clear-inventory: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a true/false value!");
return null;
}
@ -278,8 +278,8 @@ public class Event {
Location loc = Quests.getLocation(s);
if(loc == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + loc + ChatColor.GOLD + " inside " + ChatColor.GREEN + "explosions: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.log.severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + loc + ChatColor.GOLD + " inside " + ChatColor.GREEN + "explosions: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.printSevere(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
return null;
}
@ -288,7 +288,7 @@ public class Event {
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "explosions: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "explosions: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
return null;
}
@ -311,13 +311,13 @@ public class Event {
Location l = Quests.getLocation(effectLocs.get(effectList.indexOf(s)));
if(effect == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + "effects: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid effect name!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + "effects: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid effect name!");
return null;
}
if(l == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + effectLocs.get(effectList.indexOf(s)) + ChatColor.GOLD + " inside " + ChatColor.GREEN + "effect-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.log.severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + effectLocs.get(effectList.indexOf(s)) + ChatColor.GOLD + " inside " + ChatColor.GREEN + "effect-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.printSevere(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
return null;
}
@ -326,17 +326,17 @@ public class Event {
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effect-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effect-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "effect-locations:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "effect-locations:");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effects: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of effects!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "effects: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of effects!");
return null;
}
}
@ -356,7 +356,7 @@ public class Event {
if(m != null)
itemIds.add(m);
else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + i + ChatColor.GOLD + " inside " + ChatColor.GREEN + " item-ids: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid item id!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + i + ChatColor.GOLD + " inside " + ChatColor.GREEN + " item-ids: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid item id!");
return null;
}
}
@ -367,17 +367,17 @@ public class Event {
event.items.put(m, itemAmounts.get(itemIds.indexOf(m)));
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "item-amounts: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "item-amounts: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "item-amounts:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "item-amounts:");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "item-ids: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of item ids!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "item-ids: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of item ids!");
return null;
}
@ -388,7 +388,7 @@ public class Event {
World w = plugin.getServer().getWorld(data.getString(eventKey + "storm-world"));
if(w == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-world: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid World name!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-world: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid World name!");
return null;
}
@ -397,14 +397,14 @@ public class Event {
if (data.getInt(eventKey + "storm-duration", -999) != -999) {
event.stormDuration = data.getInt(eventKey + "storm-duration");
} else {
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-duration: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "storm-duration: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
return null;
}
event.stormWorld = w;
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "storm-duration:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "storm-duration:");
return null;
}
@ -415,7 +415,7 @@ public class Event {
World w = plugin.getServer().getWorld(data.getString(eventKey + "thunder-world"));
if(w == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-world: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid World name!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-world: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid World name!");
return null;
}
@ -424,14 +424,14 @@ public class Event {
if (data.getInt(eventKey + "thunder-duration", -999) != -999) {
event.thunderDuration = data.getInt(eventKey + "thunder-duration");
} else {
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-duration: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "thunder-duration: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
return null;
}
event.thunderWorld = w;
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "thunder-duration:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "thunder-duration:");
return null;
}
@ -457,14 +457,14 @@ public class Event {
Location location = Quests.getLocation(s);
if(location == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " mob-spawn-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.log.severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " mob-spawn-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.printSevere(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
return null;
}
EntityType type = Quests.getMobType(mobTypes.get(mobLocs.indexOf(s)));
if(type == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + mobTypes.get(mobLocs.indexOf(s)) + ChatColor.GOLD + " inside " + ChatColor.GREEN + " mob-spawn-types: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid mob name!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + mobTypes.get(mobLocs.indexOf(s)) + ChatColor.GOLD + " inside " + ChatColor.GREEN + " mob-spawn-types: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid mob name!");
return null;
}
@ -477,27 +477,27 @@ public class Event {
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "mob-spawn-amounts: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "mob-spawn-amounts: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "mob-spawn-amounts:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "mob-spawn-amounts:");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "mob-spawn-types: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of mob names!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "mob-spawn-types: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of mob names!");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "mob-spawn-types:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "mob-spawn-types:");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "mob-spawn-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "mob-spawn-locations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
return null;
}
@ -511,8 +511,8 @@ public class Event {
Location loc = Quests.getLocation(s);
if(loc == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.log.severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.printSevere(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
return null;
}
event.lightningStrikes.add(loc);
@ -520,7 +520,7 @@ public class Event {
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "lightning-strikes: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "lightning-strikes: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of locations!");
return null;
}
@ -546,7 +546,7 @@ public class Event {
PotionEffect effect = Quests.getPotionEffect(s, durations.get(types.indexOf(s)), amplifiers.get(types.indexOf(s)));
if(effect == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid potion effect name!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + s + ChatColor.GOLD + " inside " + ChatColor.GREEN + " lightning-strikes: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a valid potion effect name!");
return null;
}
event.potionEffects.add(effect);
@ -554,27 +554,27 @@ public class Event {
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-amplifiers: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-amplifiers: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-amplifiers:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-amplifiers:");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-durations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-durations: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of numbers!");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-durations:");
Quests.printSevere(ChatColor.GOLD + "[Quests] Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is missing " + ChatColor.RED + "potion-effect-durations:");
return null;
}
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-types: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of potion effects!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "potion-effect-types: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a list of potion effects!");
return null;
}
@ -586,7 +586,7 @@ public class Event {
if (data.getInt(eventKey + "hunger", -999) != -999) {
event.hunger = data.getInt(eventKey + "hunger");
} else {
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "hunger: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "hunger: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
return null;
}
@ -597,7 +597,7 @@ public class Event {
if (data.getInt(eventKey + "saturation", -999) != -999) {
event.saturation = data.getInt(eventKey + "saturation");
} else {
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "saturation: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "saturation: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
return null;
}
@ -608,7 +608,7 @@ public class Event {
if (data.getInt(eventKey + "health", -999) != -999) {
event.health = data.getInt(eventKey + "health");
} else {
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "health: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "health: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a number!");
return null;
}
@ -620,14 +620,14 @@ public class Event {
Location l = Quests.getLocation(data.getString(eventKey + "teleport-location"));
if(l == null){
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + data.getString(eventKey + "teleport-location") + ChatColor.GOLD + "for " + ChatColor.GREEN + " teleport-location: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.log.severe(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + data.getString(eventKey + "teleport-location") + ChatColor.GOLD + "for " + ChatColor.GREEN + " teleport-location: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not in proper location format!");
Quests.printSevere(ChatColor.GOLD + "[Quests] Proper location format is: \"WorldName x y z\"");
return null;
}
event.teleport = l;
}else{
Quests.log.severe(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "teleport-location: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a location!");
Quests.printSevere(ChatColor.GOLD + "[Quests] " + ChatColor.RED + "teleport-location: " + ChatColor.GOLD + "inside Event " + ChatColor.DARK_PURPLE + name + ChatColor.GOLD + " is not a location!");
return null;
}

View File

@ -405,7 +405,7 @@ public class PlayerListener implements Listener {
if(p.getShooter() instanceof Player){
Player player = (Player) p.getShooter();
if(plugin.citizens.getNPCRegistry().isNPC(player) == false){
if(plugin.citizens.getNPCRegistry().isNPC(player) == false && plugin.citizens.getNPCRegistry().isNPC(evt.getEntity()) == false){
Quester quester = plugin.getQuester(player.getName());
if(quester.hasObjective("killPlayer"))
@ -418,7 +418,7 @@ public class PlayerListener implements Listener {
}else if(damager instanceof Player){
Player player = (Player) damager;
if(plugin.citizens.getNPCRegistry().isNPC(player) == false){
if(plugin.citizens.getNPCRegistry().isNPC(player) == false && plugin.citizens.getNPCRegistry().isNPC(evt.getEntity()) == false){
Quester quester = plugin.getQuester(player.getName());
if(quester.hasObjective("killPlayer"))

File diff suppressed because it is too large Load Diff

View File

@ -65,4 +65,7 @@ commands:
aliases: [questsadmin]
quest:
description: Quest command
permission: quests.quest
convo:
description: Convo command
permission: quests.quest