mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Call MapInitializeEvent on newly created maps. Fixes BUKKIT-2907
This commit is contained in:
parent
f0325da814
commit
22e26a5029
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue