Removed disableOfflineRedstone (will be an addon)

This commit is contained in:
Poslovitch 2017-08-18 18:36:45 +02:00
parent b22c509f3a
commit 39ddc4eef8
2 changed files with 1 additions and 26 deletions

View File

@ -100,9 +100,7 @@ public class Settings {
public static int spawnLimitWaterAnimals;
public static HashMap<EntityType, Integer> entityLimits;
public static HashMap<String, Integer> tileEntityLimits;
public static boolean disableOfflineRedstone;
/* ISLAND */
public static int maxTeamSize;
public static int maxHomes;

View File

@ -2462,29 +2462,6 @@ public class IslandGuard implements Listener {
}
}
/**
* Stop redstone if team members are offline and disableOfflineRedstone is TRUE.
* @param e
*/
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onBlockRedstone(BlockRedstoneEvent e){
if(Settings.disableOfflineRedstone) {
// Check world
if (!Util.inWorld(e.getBlock())) {
return;
}
// Check if this is on an island
Island island = plugin.getIslands().getIslandAt(e.getBlock().getLocation());
if (island == null || island.isSpawn()) {
return;
}
for(UUID member : island.getMembers()){
if(plugin.getServer().getPlayer(member) != null) return;
}
e.setNewCurrent(0);
}
}
@EventHandler(priority=EventPriority.LOW)
public void onEvent(BlockPistonExtendEvent event) {
if (!Settings.allowTNTPushing) {