Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Implemented BLOCK_CANBUILD
Dieser Commit ist enthalten in:
Ursprung
02c469a93d
Commit
2efc265b96
@ -2,11 +2,14 @@ package net.minecraft.server;
|
|||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.*;
|
import java.util.Random;
|
||||||
import org.bukkit.craftbukkit.CraftBlock;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
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;
|
||||||
|
import org.bukkit.event.Event.Type;
|
||||||
|
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||||
|
|
||||||
|
|
||||||
@ -85,6 +88,16 @@ public class WorldServer extends World {
|
|||||||
}
|
}
|
||||||
// CraftBukkit stop
|
// CraftBukkit stop
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
@Override
|
||||||
|
public boolean a(int i1, int j1, int k1, int l1, boolean flag) {
|
||||||
|
BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j1, k1, l1), super.a(i1, j1, k1, l1, flag));
|
||||||
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
return event.isCancelled();
|
||||||
|
}
|
||||||
|
// CraftBukkit stop
|
||||||
|
|
||||||
public void f() {
|
public void f() {
|
||||||
super.f();
|
super.f();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren