org.inventivetalent.mapmanager.MapManagerPlugin Java Examples

The following examples show how to use org.inventivetalent.mapmanager.MapManagerPlugin. 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 vote down vote up
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 #2
Source File: CreativeInventoryMapUpdateEvent.java    From MapManager with MIT License 5 votes vote down vote up
/**
 * @return the {@link MapWrapper} of the item
 */
public MapWrapper getMapWrapper() {
	if (this.mapWrapper != null) { return this.mapWrapper; }
	if (getItemStack() == null) { return null; }
	if (getItemStack().getType() != Material.MAP) { return null; }
	MapManager mapManager = ((MapManagerPlugin) Bukkit.getPluginManager().getPlugin("MapManager")).getMapManager();
	return this.mapWrapper = mapManager.getWrapperForId(getPlayer(), getItemStack().getDurability());
}
 
Example #3
Source File: MapInteractEvent.java    From MapManager with MIT License 4 votes vote down vote up
/**
 * @return the clicked {@link ItemFrame}
 */
public ItemFrame getItemFrame() {
	if (this.itemFrame != null) { return this.itemFrame; }
	return this.itemFrame = MapManagerPlugin.getItemFrameById(getPlayer().getWorld(), getEntityID());
}
 
Example #4
Source File: BukkitImageViewer.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
public BukkitImageViewer(Player player) {
    mapManager = ((MapManagerPlugin) Bukkit.getPluginManager().getPlugin("MapManager")).getMapManager();
    this.player = player;
}