use of com.alessiodp.partiesapi.objects.PartyPlayer in project Parties by AlessioDP.
the class ApiHandler method setSpy.
@Deprecated
@Override
public void setSpy(UUID paramUUID, boolean paramSpy) {
PartyPlayer pp = getPartyPlayer(paramUUID);
pp.setSpy(paramSpy);
updatePartyPlayer(pp);
}
use of com.alessiodp.partiesapi.objects.PartyPlayer in project Parties by AlessioDP.
the class ApiHandler method addPlayerIntoParty.
@Deprecated
@Override
public Status addPlayerIntoParty(UUID paramUUID, String paramParty) {
Party party = plugin.getPartyManager().getParty(paramParty);
PartyPlayer player = plugin.getPlayerManager().getPlayer(paramUUID);
return addPlayerIntoParty(player, party);
}
use of com.alessiodp.partiesapi.objects.PartyPlayer in project Parties by AlessioDP.
the class ApiHandler method setRank.
@Deprecated
@Override
public void setRank(UUID paramUUID, int paramRank) {
PartyPlayer pp = getPartyPlayer(paramUUID);
pp.setRank(paramRank);
updatePartyPlayer(pp);
}
use of com.alessiodp.partiesapi.objects.PartyPlayer in project Parties by AlessioDP.
the class ApiHandler method createParty.
@Override
public Status createParty(PartyPlayer paramPartyPlayer, String paramPartyName) {
Status ret = Status.ALREADYINPARTY;
// Get an instance of PartyPlayerEntity, used to save same player
PartyPlayerEntity player = null;
if (paramPartyPlayer instanceof PartyPlayerEntity) {
player = (PartyPlayerEntity) paramPartyPlayer;
} else {
player = (PartyPlayerEntity) getPartyPlayer(paramPartyPlayer.getPlayerUUID());
}
if (player.getPartyName().isEmpty()) {
if (!plugin.getPartyManager().existParty(paramPartyName)) {
PartyEntity party = new PartyEntity(paramPartyName, plugin);
party.getMembers().add(player.getPlayerUUID());
Player p = player.getPlayer();
if (p != null)
party.getOnlinePlayers().add(p);
party.setLeader(player.getPlayerUUID());
plugin.getPartyManager().getListParties().put(party.getName().toLowerCase(), party);
player.setRank(ConfigParties.RANK_SET_HIGHER);
player.setPartyName(party.getName());
party.updateParty();
player.updatePlayer();
party.callChange();
return Status.SUCCESS;
} else
ret = Status.ALREADYEXISTPARTY;
}
return ret;
}
use of com.alessiodp.partiesapi.objects.PartyPlayer in project Parties by AlessioDP.
the class DatabaseManager method getPlayerSync.
public PartyPlayer getPlayerSync(UUID uuid) {
DebugUtils.debugLog("Data call: getPlayer()");
long nsTime = System.nanoTime();
PartyPlayer futureRet = database.getPlayer(uuid);
DebugUtils.debugDataTiming(nsTime);
return futureRet;
}
Aggregations