Option to remove permissions from perm gui.
bStats tracking Admins are demoted coleaders instead of mods Changed fly for loop to iterator to avoid concurrent exceptions
This commit is contained in:
@@ -76,7 +76,7 @@ public class CmdAdmin extends FCommand {
|
||||
|
||||
// promote target player, and demote existing admin if one exists
|
||||
if (admin != null) {
|
||||
admin.setRole(Role.MODERATOR);
|
||||
admin.setRole(Role.COLEADER);
|
||||
}
|
||||
fyou.setRole(Role.ADMIN);
|
||||
msg(TL.COMMAND_ADMIN_PROMOTES, fyou.describeTo(fme, true));
|
||||
|
||||
@@ -52,13 +52,12 @@ public class CmdCheckpoint extends FCommand {
|
||||
} else {
|
||||
fme.msg(TL.COMMAND_CHECKPOINT_CLAIMED);
|
||||
}
|
||||
this.doWarmUp(WarmUpUtil.Warmup.WARP, TL.WARMUPS_NOTIFY_TELEPORT, "Checkpoint", new Runnable() {
|
||||
this.doWarmUp(WarmUpUtil.Warmup.CHECKPOINT, TL.WARMUPS_NOTIFY_TELEPORT, "Checkpoint", new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Create a smoke effect
|
||||
CmdCheckpoint.this.me.teleport(fme.getFaction().getCheckpoint());
|
||||
|
||||
}
|
||||
}, this.p.getConfig().getLong("warmups.f-checkpoint", 0));
|
||||
}, this.p.getConfig().getLong("warmups.f-checkpoint", 10));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.sql.BatchUpdateException;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class CmdFly extends FCommand {
|
||||
|
||||
@@ -182,7 +183,10 @@ public class CmdFly extends FCommand {
|
||||
flyid = Bukkit.getScheduler().scheduleSyncRepeatingTask(P.p, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (String name : flyMap.keySet()) {
|
||||
Iterator itr = flyMap.keySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
Object nameObj = itr.next();
|
||||
String name = nameObj + "";
|
||||
Player player = Bukkit.getPlayer(name);
|
||||
if (player == null) { continue;}
|
||||
FPlayer fPlayer = FPlayers.getInstance().getByPlayer(player);
|
||||
@@ -212,7 +216,7 @@ public class CmdFly extends FCommand {
|
||||
}
|
||||
|
||||
|
||||
checkTaskState();
|
||||
checkTaskState();
|
||||
}
|
||||
}
|
||||
},20L,20L);
|
||||
|
||||
Reference in New Issue
Block a user