Search in sources :

Example 6 with EntityItemFrameHandle

use of com.bergerkiller.generated.net.minecraft.world.entity.decoration.EntityItemFrameHandle in project BKCommonLib by bergerhealer.

the class CommonMapController method onEntityAdded.

@EventHandler(priority = EventPriority.MONITOR)
protected synchronized void onEntityAdded(EntityAddEvent event) {
    if (this.isFrameDisplaysEnabled && event.getEntity() instanceof ItemFrame) {
        EntityItemFrameHandle frameHandle = EntityItemFrameHandle.createHandle(HandleConversion.toEntityHandle(event.getEntity()));
        getItemFrameEntities(new ItemFrameClusterKey(frameHandle)).add(frameHandle);
        onAddItemFrame(frameHandle);
    }
}
Also used : EntityItemFrameHandle(com.bergerkiller.generated.net.minecraft.world.entity.decoration.EntityItemFrameHandle) ItemFrame(org.bukkit.entity.ItemFrame) EventHandler(org.bukkit.event.EventHandler)

Aggregations

EntityItemFrameHandle (com.bergerkiller.generated.net.minecraft.world.entity.decoration.EntityItemFrameHandle)6 ItemFrameInfo (com.bergerkiller.bukkit.common.map.binding.ItemFrameInfo)3 ItemFrame (org.bukkit.entity.ItemFrame)3 MapUUID (com.bergerkiller.bukkit.common.map.util.MapUUID)2 OfflineWorld (com.bergerkiller.bukkit.common.offline.OfflineWorld)2 HashSet (java.util.HashSet)2 UUID (java.util.UUID)2 World (org.bukkit.World)2 EventHandler (org.bukkit.event.EventHandler)2 IntVector3 (com.bergerkiller.bukkit.common.bases.IntVector3)1 CommonMapReloadFile (com.bergerkiller.bukkit.common.internal.CommonMapReloadFile)1 MapDisplayTile (com.bergerkiller.bukkit.common.map.MapDisplayTile)1 MapSession (com.bergerkiller.bukkit.common.map.MapSession)1 ArrayList (java.util.ArrayList)1 BlockFace (org.bukkit.block.BlockFace)1 Player (org.bukkit.entity.Player)1 ItemStack (org.bukkit.inventory.ItemStack)1 PlayerInventory (org.bukkit.inventory.PlayerInventory)1