mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-29 05:26:18 +01:00
fixed other bugs linked to #121
This commit is contained in:
parent
2c734d1cb5
commit
a41ffaedee
@ -102,7 +102,7 @@ public class MapDetailGui extends ExplorerGui<Integer>
|
||||
|
||||
if (map instanceof SingleMap)
|
||||
{
|
||||
return MapItemManager.createMapItem((SingleMap)map);
|
||||
return MapItemManager.createMapItem((SingleMap)map,true);
|
||||
}
|
||||
else if (map instanceof PosterMap)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ public class MapListGui extends ExplorerGui<ImageMap>
|
||||
|
||||
if (map instanceof SingleMap)
|
||||
{
|
||||
return MapItemManager.createMapItem(map.getMapsIDs()[0], map.getName(), false);
|
||||
return MapItemManager.createMapItem(map.getMapsIDs()[0], map.getName(), false,true);
|
||||
}
|
||||
else if (map instanceof PosterMap)
|
||||
{
|
||||
|
@ -43,10 +43,10 @@ import fr.moribus.imageonmap.map.PosterMap;
|
||||
import fr.moribus.imageonmap.map.SingleMap;
|
||||
import fr.zcraft.zlib.components.i18n.I;
|
||||
import fr.zcraft.zlib.core.ZLib;
|
||||
import fr.zcraft.zlib.tools.PluginLogger;
|
||||
import fr.zcraft.zlib.tools.items.ItemStackBuilder;
|
||||
import fr.zcraft.zlib.tools.items.ItemUtils;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.ItemFrame;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -190,7 +190,6 @@ public class MapItemManager implements Listener
|
||||
meta.setMapId(mapID);
|
||||
meta.setColor(isMapPart ? Color.LIME : Color.GREEN);
|
||||
mapItem.setItemMeta(meta);
|
||||
PluginLogger.info("color "+meta.getColor());
|
||||
return mapItem;
|
||||
}
|
||||
static public ItemStack createMapItem(int mapID, String text, boolean isMapPart)
|
||||
@ -271,10 +270,12 @@ public class MapItemManager implements Listener
|
||||
event.setCancelled(true); //In case of an error allow to cancel map placement
|
||||
return;
|
||||
}
|
||||
if(frame.getFacing()!= BlockFace.UP&&frame.getFacing()!= BlockFace.DOWN)
|
||||
frame.setRotation(Rotation.NONE.rotateCounterClockwise());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(frame.getFacing()!= BlockFace.UP&&frame.getFacing()!= BlockFace.DOWN)
|
||||
frame.setRotation(Rotation.NONE.rotateCounterClockwise());
|
||||
// If the item has a display name, bot not one from an anvil by the player, we remove it
|
||||
// If it is not displayed on hover on the wall.
|
||||
|
Loading…
Reference in New Issue
Block a user