mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Improvements to mcMMOPlayer lookup.
This commit is contained in:
@ -9,7 +9,6 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
@ -41,13 +40,7 @@ public final class PartyAPI {
|
||||
* @return true if the player is in a party, false otherwise
|
||||
*/
|
||||
public static boolean inParty(Player player) {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
if (mcMMOPlayer == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return mcMMOPlayer.inParty();
|
||||
return UserManager.getPlayer(player).inParty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user