From 24bdd10f7f0840d974cfb0e9848af8972f4cee97 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 8 Mar 2012 18:23:04 -0800 Subject: [PATCH] PTP Exploit fix attempt #2 --- .../java/com/gmail/nossr50/commands/party/PtpCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java index 138fdc8ee..7071d30b5 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java @@ -11,6 +11,7 @@ import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcPermissions; import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.locale.mcLocale; +import com.gmail.nossr50.party.Party; public class PtpCommand implements CommandExecutor { private final mcMMO plugin; @@ -35,11 +36,12 @@ public class PtpCommand implements CommandExecutor { return true; } - if(PP.getParty() == null || PP.getParty() == "") + if(Party.getInstance().isParty(PP.getParty())) { player.sendMessage(ChatColor.RED+"You are not in a party!"); return true; } + if (args.length < 1) { player.sendMessage(ChatColor.RED + "Usage is /ptp "); return true;