mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Improved water/bucket fix by having it set back the original block. Unfortunately this doesn't do anything about setting water buckets into lava (creating obsidian).
This commit is contained in:
parent
0a8dd85224
commit
84eb9343ce
@ -236,13 +236,14 @@ public boolean onBlockCreate(Player player, Block blockPlaced, Block blockClicke
|
|||||||
final int x = blockPlaced.getX();
|
final int x = blockPlaced.getX();
|
||||||
final int y = blockPlaced.getY();
|
final int y = blockPlaced.getY();
|
||||||
final int z = blockPlaced.getZ();
|
final int z = blockPlaced.getZ();
|
||||||
|
final int existingID = etc.getServer().getBlockIdAt(x, y, z);
|
||||||
|
|
||||||
// This is REALLY BAD, but there's no other choice
|
// This is REALLY BAD, but there's no other choice
|
||||||
// at the moment that is as reliable
|
// at the moment that is as reliable
|
||||||
timer.schedule(new TimerTask() {
|
timer.schedule(new TimerTask() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
etc.getServer().setBlockAt(0, x, y, z);
|
etc.getServer().setBlockAt(existingID, x, y, z);
|
||||||
} catch (Throwable t) {}
|
} catch (Throwable t) {}
|
||||||
}
|
}
|
||||||
}, 200); // Just in case
|
}, 200); // Just in case
|
||||||
|
Loading…
Reference in New Issue
Block a user