src/main/java/brokenlib/common/notification/ServerNotificationManager.java
/**
     * Called when the client reply is received on the server. Checks if the notification id is available, if the player
     * targeted by the notification is the same player who sent the packet.
     * @param player The player replying
     * @param pck the packet received from the client
     */
Called when the client reply is received on the server. Checks if the notification id is available, if the player
targeted by the notification is the same player who sent the packet.
@param player The player replying
@param pck the packet received from the client
Called when the client reply is received on the server . Checks if the notification id is available if the player targeted by the notification is the same player who sent the packet . @param player The player replying @param pck the packet received from the client
public void receivedNotificationPacket(EntityPlayerMP player, CSPacketNotification pck) {
        if (!this.notifications.containsKey(pck.getNotificationId())) return;
        LinkedNotification linkedNotification = notifications.get(pck.getNotificationId());
        if (!linkedNotification.target.equals(player.getUniqueID())) return;
        linkedNotification.notification.fromNBT(pck.getNBT(), Side.SERVER);
        if (linkedNotification.notification.receivedOnServer(player)) {
            linkedNotification.notification.onRemove(Side.SERVER);
            this.notifications.remove(pck.getNotificationId());
            freeId(pck.getNotificationId());
            new SPacketRemoveNotification(pck.getNotificationId()).sendUsing(network).to(player);
        }
        BrokenLib.proxy.getDataWrapper().markDirty();
    }
public void receivedNotificationPacket ( EntityPlayerMP player , CSPacketNotification pck ) { if ( ! this . notifications . containsKey ( pck . getNotificationId ( ) ) ) return ; LinkedNotification linkedNotification = notifications . get ( pck . getNotificationId ( ) ) ; if ( ! linkedNotification . target . equals ( player . getUniqueID ( ) ) ) return ; linkedNotification . notification . fromNBT ( pck . getNBT ( ) , Side . SERVER ) ; if ( linkedNotification . notification . receivedOnServer ( player ) ) { linkedNotification . notification . onRemove ( Side . SERVER ) ; this . notifications . remove ( pck . getNotificationId ( ) ) ; freeId ( pck . getNotificationId ( ) ) ; new SPacketRemoveNotification ( pck . getNotificationId ( ) ) . sendUsing ( network ) . to ( player ) ; } BrokenLib . proxy . getDataWrapper ( ) . markDirty ( ) ; }
Called when the client reply is received on the server.
Called when the client reply is received on the server .