org.inventivetalent.mapmanager.controller.MultiMapController Java Examples
The following examples show how to use
org.inventivetalent.mapmanager.controller.MultiMapController.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnimatedFrame.java From AnimatedFrames with MIT License | 6 votes |
private void displayCurrentFrame() { MultiMapController controller = ((MultiMapController) this.mapWrappers[this.currentFrame].getController()); for (Iterator<UUID> iterator = this.worldPlayers.iterator(); iterator.hasNext(); ) { OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(iterator.next()); Player player = offlinePlayer != null ? offlinePlayer.getPlayer() : null; if (player != null) { if (player.getWorld().getName().equals(worldName)) { if (player.getLocation().distanceSquared(baseVector.toBukkitLocation(getWorld())) < plugin.maxAnimateDistanceSquared) { controller.showInFrames(player.getPlayer(), this.itemFrameIds); } } } else { iterator.remove(); if (offlinePlayer != null) { for (MapWrapper wrapper : this.mapWrappers) { wrapper.getController().removeViewer(offlinePlayer); } } } } }
Example #2
Source File: AnimatedFrame.java From AnimatedFrames with MIT License | 6 votes |
public void clearFrames() { if (this.mapWrappers != null) { for (MapWrapper wrapper : this.mapWrappers) { for (UUID uuid : worldPlayers) { Player player = Bukkit.getPlayer(uuid); if (player != null) { ((MultiMapController) wrapper.getController()).clearFrames(player, this.itemFrameIds); } } wrapper.getController().clearViewers(); } for (int[] iA : this.itemFrameIds) { for (int i : iA) { ItemFrame itemFrame = MapManagerPlugin.getItemFrameById(getWorld(), i); if (itemFrame != null) { itemFrame.removeMetadata("ANIMATED_FRAMES_META", plugin); } } } } }
Example #3
Source File: MultiMapWrapper.java From MapManager with MIT License | 4 votes |
@Override public MultiMapController getController() { return this.controller; }