summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-11-21 16:48:25 -0600
committerfeildmaster <admin@feildmaster.com>2012-11-21 16:48:25 -0600
commit22e26a5029e9bd55f370707fa5e0a8f47771ae83 (patch)
treedf2add710ed219f33d2f28e66562a6c8e39afa10 /src/main/java/net/minecraft/server
parentf0325da814e5681e937e0586c508aac5f9835e8c (diff)
downloadcraftbukkit-22e26a5029e9bd55f370707fa5e0a8f47771ae83.tar
craftbukkit-22e26a5029e9bd55f370707fa5e0a8f47771ae83.tar.gz
craftbukkit-22e26a5029e9bd55f370707fa5e0a8f47771ae83.tar.lz
craftbukkit-22e26a5029e9bd55f370707fa5e0a8f47771ae83.tar.xz
craftbukkit-22e26a5029e9bd55f370707fa5e0a8f47771ae83.zip
Call MapInitializeEvent on newly created maps. Fixes BUKKIT-2907
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/ItemMapEmpty.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemMapEmpty.java b/src/main/java/net/minecraft/server/ItemMapEmpty.java
index 7bab738a..b7755b03 100644
--- a/src/main/java/net/minecraft/server/ItemMapEmpty.java
+++ b/src/main/java/net/minecraft/server/ItemMapEmpty.java
@@ -18,8 +18,11 @@ public class ItemMapEmpty extends ItemWorldMapBase {
worldmap.centerX = (int) (Math.round(entityhuman.locX / (double) i) * (long) i);
worldmap.centerZ = (int) (Math.round(entityhuman.locZ / (double) i) * (long) i);
- worldmap.map = (byte) world.worldProvider.dimension;
+ worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - use bukkit dimension
worldmap.c();
+
+ org.bukkit.craftbukkit.event.CraftEventFactory.callEvent(new org.bukkit.event.server.MapInitializeEvent(worldmap.mapView)); // CraftBukkit
+
--itemstack.count;
if (itemstack.count <= 0) {
return itemstack1;