Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-24 07:10:10 +01:00
Oopsie on compile issue
Dieser Commit ist enthalten in:
Ursprung
2497a61044
Commit
7b840489a3
src/main/java/net/minecraft/server
@ -16,6 +16,15 @@ import java.util.Random;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
import org.bukkit.event.Event;
|
||||||
|
import org.bukkit.event.Event.Type;
|
||||||
|
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||||
|
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
public class World implements IBlockAccess {
|
public class World implements IBlockAccess {
|
||||||
|
|
||||||
public boolean a = false;
|
public boolean a = false;
|
||||||
@ -435,9 +444,10 @@ public class World implements IBlockAccess {
|
|||||||
|
|
||||||
if (block != null) {
|
if (block != null) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
CraftWorld world = ((WorldServer) this).getWorld();
|
||||||
if (world != null) {
|
if (world != null) {
|
||||||
BlockPhysicsEvent event = new BlockPhysicsEvent(Event.Type.BLOCK_PHYSICS, world.getBlockAt(i, j, k), l);
|
BlockPhysicsEvent event = new BlockPhysicsEvent(Event.Type.BLOCK_PHYSICS, world.getBlockAt(i, j, k), l);
|
||||||
server.getPluginManager().callEvent(event);
|
((WorldServer) this).getServer().getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1640,8 +1650,8 @@ public class World implements IBlockAccess {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j, k, l), i1, defaultReturn);
|
BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, ((WorldServer) this).getWorld().getBlockAt(j, k, l), i1, defaultReturn);
|
||||||
server.getPluginManager().callEvent(event);
|
((WorldServer) this).getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
return event.isBuildable();
|
return event.isBuildable();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -9,10 +9,6 @@ import java.util.Random;
|
|||||||
import org.bukkit.BlockChangeDelegate;
|
import org.bukkit.BlockChangeDelegate;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.Event.Type;
|
|
||||||
import org.bukkit.event.block.BlockCanBuildEvent;
|
|
||||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
|
||||||
|
|
||||||
public class WorldServer extends World implements BlockChangeDelegate {
|
public class WorldServer extends World implements BlockChangeDelegate {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -29,9 +25,9 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
|||||||
this.D = minecraftserver;
|
this.D = minecraftserver;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
world = new CraftWorld(this);
|
this.world = new CraftWorld(this);
|
||||||
server = minecraftserver.server;
|
this.server = minecraftserver.server;
|
||||||
manager = new PlayerManager(minecraftserver, this);
|
this.manager = new PlayerManager(minecraftserver, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final CraftWorld world;
|
private final CraftWorld world;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren