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