diff --git a/Jar/PlayerSlap_vDevelopment-0.0.0.4_1.7-1.12.jar b/Jar/PlayerSlap_vDevelopment-0.0.0.5_1.7-1.12.jar similarity index 80% rename from Jar/PlayerSlap_vDevelopment-0.0.0.4_1.7-1.12.jar rename to Jar/PlayerSlap_vDevelopment-0.0.0.5_1.7-1.12.jar index 565af2d..5c1daf5 100644 Binary files a/Jar/PlayerSlap_vDevelopment-0.0.0.4_1.7-1.12.jar and b/Jar/PlayerSlap_vDevelopment-0.0.0.5_1.7-1.12.jar differ diff --git a/PlayerSlap/plugin.yml b/PlayerSlap/plugin.yml index 0f13c56..68da8e5 100644 --- a/PlayerSlap/plugin.yml +++ b/PlayerSlap/plugin.yml @@ -1,6 +1,6 @@ name: PlayerSlap main: me.PlayerSlap.MainClasses.PlayerSlapMainClass -version: Development_0.0.0.4 +version: Development_0.0.0.5 description: A plugin to slap players author: aappleton3 database: false diff --git a/PlayerSlap/src/me/PlayerSlap/CommandClasses/SlapInfoCommand.java b/PlayerSlap/src/me/PlayerSlap/CommandClasses/SlapInfoCommand.java index d6cfa4c..263eddc 100644 --- a/PlayerSlap/src/me/PlayerSlap/CommandClasses/SlapInfoCommand.java +++ b/PlayerSlap/src/me/PlayerSlap/CommandClasses/SlapInfoCommand.java @@ -144,7 +144,7 @@ else if (args[0].equalsIgnoreCase("player")) { String sid = pid.toString(); s.sendMessage(ChatColor.AQUA + "The player " + args[1] + " has the following information: "); s.sendMessage("Is exempt: " + plugin.yd.configuration.getString("players." + sid + ".exempt")); - s.sendMessage("This player has been slapped " + plugin.yd.configuration.getString("player." + sid + ".times") + " times "); + s.sendMessage("This player has been slapped " + plugin.yd.configuration.getString("players." + sid + ".times") + " times "); if (plugin.needAcceptPlayers.containsKey(pid)) { s.sendMessage(ChatColor.RED + "This player is currently under a slap "); s.sendMessage("Player must accept slap: " + plugin.needAcceptPlayers.get(pid).getKey().toString()); @@ -172,7 +172,7 @@ else if (args[0].equalsIgnoreCase("times")) { plugin.ms.sendMessage(s, "noplayerconfig", null); } else { - s.sendMessage("The player " + args[1] + " has been slapped " + plugin.yd.configuration.getString("player." + pid.toString() + ".times") + " times "); + s.sendMessage("The player " + args[1] + " has been slapped " + plugin.yd.configuration.getString("players." + pid.toString() + ".times") + " times "); } } else { @@ -187,15 +187,20 @@ else if (args[0].equalsIgnoreCase("times")) { else if (args[0].equalsIgnoreCase("general")) { if (args.length == 1) { if (s.hasPermission("playerslap.info.general")) { - s.sendMessage("General " + plugin.descriptionFile.getName() + " plugin config information: "); - s.sendMessage("Players can slap themselves: " + plugin.yc.configuration.getString("slapself")); - s.sendMessage("Default slap type: " + plugin.yc.configuration.getString("slapdefault")); - s.sendMessage("Player slap counts incremented on '/slapall' command uses: " + plugin.yc.configuration.getString("incrementonslapall")); - s.sendMessage("Slap accept broadcast message: " + plugin.yc.configuration.getString("messages.accept").replaceAll("__Default", plugin.ms.acceptSlapMessage)); - s.sendMessage("Personal slap release message: " + plugin.yc.configuration.getString("messages.releasepersonal").replaceAll("__Default", plugin.ms.personalReleaseMessage)); - s.sendMessage("Broadcast slap release message: " + plugin.yc.configuration.getString("messages.releasebroadcast").replaceAll("__Default", plugin.ms.broadcastReleaseMessage)); - s.sendMessage("Personal slap no release message: " + plugin.yc.configuration.getString("messages.noreleasepersonal").replaceAll("__Default", plugin.ms.personalNoReleaseMessage)); - s.sendMessage("Sender slap no release message: " + plugin.yc.configuration.getString("messages.noreleasesender").replaceAll("__Default", plugin.ms.senderNoReleaseMessage)); + try { + s.sendMessage("General " + plugin.descriptionFile.getName() + " plugin config information: "); + s.sendMessage("Players can slap themselves: " + plugin.yc.configuration.getString("slapself")); + s.sendMessage("Default slap type: " + plugin.yc.configuration.getString("slapdefault")); + s.sendMessage("Player slap counts incremented on '/slapall' command uses: " + plugin.yc.configuration.getString("incrementonslapall")); + s.sendMessage("Slap accept broadcast message: " + plugin.yc.configuration.getString("messages.accept").replaceAll("__Default", plugin.ms.acceptSlapMessage)); + s.sendMessage("Personal slap release message: " + plugin.yc.configuration.getString("messages.releasepersonal").replaceAll("__Default", plugin.ms.personalReleaseMessage)); + s.sendMessage("Broadcast slap release message: " + plugin.yc.configuration.getString("messages.releasebroadcast").replaceAll("__Default", plugin.ms.broadcastReleaseMessage)); + s.sendMessage("Personal slap no release message: " + plugin.yc.configuration.getString("messages.noreleasepersonal").replaceAll("__Default", plugin.ms.personalNoReleaseMessage)); + s.sendMessage("Sender slap no release message: " + plugin.yc.configuration.getString("messages.noreleasesender").replaceAll("__Default", plugin.ms.senderNoReleaseMessage)); + } + catch (NullPointerException e) { + plugin.ms.sendMessage(s, "configerror", "Messages section of the config.yml file "); + } } else { plugin.ms.sendMessage(s, "nopermission", null); @@ -210,5 +215,4 @@ else if (args[0].equalsIgnoreCase("general")) { return false; } } - }