public FrameInfo(Frame type, ItemFrame frame) { this.type = type; id = frame.getUniqueId(); Location loc = frame.getLocation(); Chunk chunk = loc.getChunk(); worldId = chunk.getWorld().getUID(); chunk_x = chunk.getX(); chunk_z = chunk.getZ(); instance = new WeakReference<ItemFrame>(frame); }
public final void removeFrame(final ItemFrame frame) { final UUID uid = frame.getUniqueId(); if (portalFrames.containsKey(uid)) portalFrames.remove(uid); }
public final void addFrame(final ABPortal portal, final ItemFrame frame) { if (!allPortals.containsKey(portal.uid)) return; final UUID uid = frame.getUniqueId(); if (!portalFrames.containsKey(uid)) portalFrames.put(uid, portal.uid); }