Moved spawn-protection from server.properties into (settings.)spawn-radius in bukkit.yml

This commit is contained in:
Dinnerbone
2011-06-17 04:49:58 +01:00
parent c0244eda04
commit 7aadc3d666
6 changed files with 22 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ import net.minecraft.server.Item;
import net.minecraft.server.ItemStack;
import net.minecraft.server.World;
import net.minecraft.server.WorldServer;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -50,7 +51,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
public class CraftEventFactory {
private static boolean canBuild(CraftWorld world, Player player, int x, int z) {
WorldServer worldServer = world.getHandle();
int spawnSize = worldServer.server.spawnProtection;
int spawnSize = Bukkit.getServer().getSpawnRadius();
if (spawnSize <= 0) return true;
if (player.isOp()) return true;