Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Didn't work correctly before. Now it does
Dieser Commit ist enthalten in:
Ursprung
2efc265b96
Commit
c7d680163f
@ -1,6 +1,5 @@
|
|||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -91,10 +90,16 @@ public class WorldServer extends World {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@Override
|
@Override
|
||||||
public boolean a(int i1, int j1, int k1, int l1, boolean flag) {
|
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));
|
boolean superResult = super.a(i1, j1, k1, l1, flag);
|
||||||
|
|
||||||
|
if (!flag) {
|
||||||
|
BlockCanBuildEvent event = new BlockCanBuildEvent(Type.BLOCK_CANBUILD, getWorld().getBlockAt(j1, k1, l1), !superResult);
|
||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
return event.isCancelled();
|
return !event.isCancelled();
|
||||||
|
} else {
|
||||||
|
return superResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit stop
|
// CraftBukkit stop
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren