Try to lower the amount of time spent on each move event as mentioned in
issue #26
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package com.graywolf336.jail.command.subcommands;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -41,13 +41,13 @@ public class JailListCommand implements Command {
|
||||
//No jail was found
|
||||
sender.sendMessage(" " + jm.getPlugin().getJailIO().getLanguageString(LangString.NOJAIL, args[1]));
|
||||
}else {
|
||||
HashSet<Prisoner> pris = j.getAllPrisoners();
|
||||
Collection<Prisoner> pris = j.getAllPrisoners().values();
|
||||
|
||||
if(pris.isEmpty()) {
|
||||
//If there are no prisoners, then send that message
|
||||
sender.sendMessage(" " + jm.getPlugin().getJailIO().getLanguageString(LangString.NOPRISONERS, j.getName()));
|
||||
}else {
|
||||
for(Prisoner p : j.getAllPrisoners()) {
|
||||
for(Prisoner p : pris) {
|
||||
//graywolf663: Being gray's evil twin; CONSOLE (10)
|
||||
//prisoner: reason; jailer (time in minutes)
|
||||
sender.sendMessage(ChatColor.BLUE + " " + p.getLastKnownName() + ": " + p.getReason() + "; " + p.getJailer() + " (" + p.getRemainingTimeInMinutes() + " mins)");
|
||||
|
@ -41,7 +41,7 @@ public class JailTransferAllCommand implements Command {
|
||||
jm.getPlugin().debug("Sending the transferring off, jail checks all came clean.");
|
||||
|
||||
Jail old = jm.getJail(args[1]);
|
||||
HashSet<Prisoner> oldPrisoners = new HashSet<Prisoner>(old.getAllPrisoners());
|
||||
HashSet<Prisoner> oldPrisoners = new HashSet<Prisoner>(old.getAllPrisoners().values());
|
||||
|
||||
//Transfer all the prisoners
|
||||
for(Prisoner p : oldPrisoners) {
|
||||
|
Reference in New Issue
Block a user