Removed autoLeaveImmunity due to missdesign in the Permissions plugin.
This commit is contained in:
		@@ -510,13 +510,6 @@ public class FPlayer {
 | 
			
		||||
		double toleranceMillis = Conf.autoLeaveAfterDaysOfInactivity * 24 * 60 * 60 * 1000;
 | 
			
		||||
		
 | 
			
		||||
		for (FPlayer fplayer : FPlayer.getAll()) {
 | 
			
		||||
			// Test if the player is immune
 | 
			
		||||
			if (Factions.Permissions != null) {
 | 
			
		||||
				if (Factions.Permissions.has(fplayer.getPlayer(), "factions.autoLeaveImmunity")) {
 | 
			
		||||
					continue;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
			if (now - fplayer.getLastLoginTime() > toleranceMillis) {
 | 
			
		||||
				fplayer.leave();
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
@@ -212,10 +212,6 @@ public class Factions extends JavaPlugin {
 | 
			
		||||
		return hasPerm(sender, "factions.manageSafeZone", true);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public static boolean hasPermAutoLeaveImmunity(CommandSender sender) {
 | 
			
		||||
		return hasPerm(sender, "factions.autoLeaveImmunity", true);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	private static boolean hasPerm(CommandSender sender, String permNode, boolean fallbackOnlyOp) {
 | 
			
		||||
		if (Factions.Permissions == null || ! (sender instanceof Player)) {
 | 
			
		||||
			return fallbackOnlyOp == false || sender.isOp();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user