diff --git a/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpCommand.java b/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpCommand.java index e7443de42..7011834e7 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpCommand.java @@ -115,9 +115,13 @@ public class PtpCommand implements TabExecutor { if (matches.size() == 0) { Player player = (Player) sender; - Party party = UserManager.getPlayer(player).getParty(); + McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); - List playerNames = party.getOnlinePlayerNames(player); + if (!mcMMOPlayer.inParty()) { + return ImmutableList.of(); + } + + List playerNames = mcMMOPlayer.getParty().getOnlinePlayerNames(player); return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList(playerNames.size())); }