mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Fix /party teleport NPE (#4885)
This commit is contained in:
parent
79730383ab
commit
606a92f1ef
@ -200,15 +200,19 @@ public class PartyCommand implements TabExecutor {
|
|||||||
|
|
||||||
if (matches.size() == 0) {
|
if (matches.size() == 0) {
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
//Not Loaded
|
//Not Loaded
|
||||||
if(UserManager.getPlayer(player) == null)
|
if(mcMMOPlayer == null)
|
||||||
{
|
{
|
||||||
sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
||||||
return ImmutableList.of();
|
return ImmutableList.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
Party party = UserManager.getPlayer(player).getParty();
|
if (mcMMOPlayer.getParty() == null)
|
||||||
|
return ImmutableList.of();
|
||||||
|
|
||||||
|
final Party party = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
playerNames = party.getOnlinePlayerNames(player);
|
playerNames = party.getOnlinePlayerNames(player);
|
||||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<>(playerNames.size()));
|
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<>(playerNames.size()));
|
||||||
|
Loading…
Reference in New Issue
Block a user