Removed disableOfflineRedstone (will be an addon)
This commit is contained in:
parent
b22c509f3a
commit
39ddc4eef8
|
@ -100,9 +100,7 @@ public class Settings {
|
||||||
public static int spawnLimitWaterAnimals;
|
public static int spawnLimitWaterAnimals;
|
||||||
public static HashMap<EntityType, Integer> entityLimits;
|
public static HashMap<EntityType, Integer> entityLimits;
|
||||||
public static HashMap<String, Integer> tileEntityLimits;
|
public static HashMap<String, Integer> tileEntityLimits;
|
||||||
|
|
||||||
public static boolean disableOfflineRedstone;
|
|
||||||
|
|
||||||
/* ISLAND */
|
/* ISLAND */
|
||||||
public static int maxTeamSize;
|
public static int maxTeamSize;
|
||||||
public static int maxHomes;
|
public static int maxHomes;
|
||||||
|
|
|
@ -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)
|
@EventHandler(priority=EventPriority.LOW)
|
||||||
public void onEvent(BlockPistonExtendEvent event) {
|
public void onEvent(BlockPistonExtendEvent event) {
|
||||||
if (!Settings.allowTNTPushing) {
|
if (!Settings.allowTNTPushing) {
|
||||||
|
|
Loading…
Reference in New Issue