Search in sources :

Example 1 with IPartyPostBroadcastEvent

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);
}
Also used : IPartyPostBroadcastEvent(com.alessiodp.parties.api.events.common.party.IPartyPostBroadcastEvent)

Example 2 with IPartyPostBroadcastEvent

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);
    }
}
Also used : PartyPlayerImpl(com.alessiodp.parties.common.players.objects.PartyPlayerImpl) PartyImpl(com.alessiodp.parties.common.parties.objects.PartyImpl) IPartyPostBroadcastEvent(com.alessiodp.parties.api.events.common.party.IPartyPostBroadcastEvent)

Aggregations

IPartyPostBroadcastEvent (com.alessiodp.parties.api.events.common.party.IPartyPostBroadcastEvent)2 PartyImpl (com.alessiodp.parties.common.parties.objects.PartyImpl)1 PartyPlayerImpl (com.alessiodp.parties.common.players.objects.PartyPlayerImpl)1