Search in sources :

Example 6 with PermissionEvent

use of com.minecolonies.api.colony.permissions.PermissionEvent in project minecolonies by ldtteam.

the class BuildingTownHall method serializeToView.

@Override
public void serializeToView(@NotNull final PacketBuffer buf) {
    super.serializeToView(buf);
    buf.writeBoolean(MineColonies.getConfig().getServer().canPlayerUseAllyTHTeleport.get());
    buf.writeInt(permissionEvents.size());
    for (final PermissionEvent event : permissionEvents) {
        event.serialize(buf);
    }
    List<IColonyEventDescription> colonyEvents = colony.getEventDescriptionManager().getEventDescriptions();
    buf.writeInt(colonyEvents.size());
    for (final IColonyEventDescription event : colonyEvents) {
        buf.writeUtf(event.getEventTypeId().getPath());
        event.serialize(buf);
    }
}
Also used : IColonyEventDescription(com.minecolonies.api.colony.colonyEvents.descriptions.IColonyEventDescription) PermissionEvent(com.minecolonies.api.colony.permissions.PermissionEvent)

Aggregations

PermissionEvent (com.minecolonies.api.colony.permissions.PermissionEvent)6 IColonyEventDescription (com.minecolonies.api.colony.colonyEvents.descriptions.IColonyEventDescription)3 FakePlayer (net.minecraftforge.common.util.FakePlayer)2 Pane (com.ldtteam.blockout.Pane)1 Text (com.ldtteam.blockout.controls.Text)1 ScrollingList (com.ldtteam.blockout.views.ScrollingList)1 IBuildingEventDescription (com.minecolonies.api.colony.colonyEvents.descriptions.IBuildingEventDescription)1 ICitizenEventDescription (com.minecolonies.api.colony.colonyEvents.descriptions.ICitizenEventDescription)1 CitizenDiedEvent (com.minecolonies.coremod.colony.colonyEvents.citizenEvents.CitizenDiedEvent)1 PermissionsMessage (com.minecolonies.coremod.network.messages.PermissionsMessage)1 TranslationTextComponent (net.minecraft.util.text.TranslationTextComponent)1