mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 19:54:43 +02:00
Some fixes
This commit is contained in:
@ -17,6 +17,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.spongepowered.api.CatalogType;
|
||||
import org.spongepowered.api.Game;
|
||||
import org.spongepowered.api.Platform;
|
||||
import org.spongepowered.api.Server;
|
||||
import org.spongepowered.api.block.BlockState;
|
||||
import org.spongepowered.api.block.BlockType;
|
||||
@ -637,4 +638,9 @@ public class SpongeMain implements IPlotMain, PluginContainer {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNMSPackage() {
|
||||
return "1_8_R3";
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ import org.spongepowered.api.world.WorldCreationSettings;
|
||||
import org.spongepowered.api.world.gen.WorldGenerator;
|
||||
import org.spongepowered.api.world.gen.WorldGeneratorModifier;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.object.PlotCluster;
|
||||
import com.intellectualcrafters.plot.object.PlotWorld;
|
||||
import com.intellectualcrafters.plot.util.ClusterManager;
|
||||
|
@ -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