mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-28 01:55:27 +02:00
Some fixes
This commit is contained in:
@@ -184,7 +184,12 @@ public class SpongeBlockManager extends BlockManager {
|
||||
if (state == null) {
|
||||
return;
|
||||
}
|
||||
SpongeUtil.getWorld(worldname).setBlock(x, y, z, state);
|
||||
World world = SpongeUtil.getWorld(worldname);
|
||||
BlockState block = world.getBlock(x, y, z);
|
||||
if (block != state) {
|
||||
world.setBlock(x, y, z, state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -65,8 +65,14 @@ public class SpongeUtil {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static World lastWorld;
|
||||
private static String last;
|
||||
|
||||
public static World getWorld(String world) {
|
||||
if (world == last) {
|
||||
return lastWorld;
|
||||
}
|
||||
Optional<World> optional = SpongeMain.THIS.getServer().getWorld(world);
|
||||
if (!optional.isPresent()) {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user