use of com.alessiodp.parties.api.events.common.party.IPartyPostBroadcastEvent in project Parties by AlessioDP.
the class PartyImpl method sendPacketBroadcast.
public void sendPacketBroadcast(String message, PartyPlayerImpl partyPlayer, boolean dispatchBetweenServers) {
// Calling API Event
IPartyPostBroadcastEvent event = plugin.getEventManager().preparePartyPostBroadcastEvent(this, message, partyPlayer);
plugin.getEventManager().callEvent(event);
}
use of com.alessiodp.parties.api.events.common.party.IPartyPostBroadcastEvent in project Parties by AlessioDP.
the class CommonListener method handlePostBroadcast.
public void handlePostBroadcast(UUID partyId, UUID playerId, String message) {
PartyImpl party = plugin.getPartyManager().getParty(partyId);
if (party != null) {
PartyPlayerImpl player = plugin.getPlayerManager().getPlayer(playerId);
IPartyPostBroadcastEvent event = plugin.getEventManager().preparePartyPostBroadcastEvent(party, message, player);
plugin.getEventManager().callEvent(event);
plugin.getLoggerManager().logDebug(String.format(PartiesConstants.DEBUG_MESSAGING_LISTEN_BROADCAST_MESSAGE, playerId != null ? playerId.toString() : "none", partyId.toString(), message), true);
}
}
Aggregations