解决了无法自动切换玩家任务队列的bug
This commit is contained in:
parent
ee78a96e14
commit
a338b33172
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>site.deercloud</groupId>
|
||||
<artifactId>LiteWorldEdit</artifactId>
|
||||
<version>1.3-SNAPSHOT</version>
|
||||
<version>1.4-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>LiteWorldEdit</name>
|
||||
|
@ -50,6 +50,7 @@ public class Cache {
|
||||
return null;
|
||||
}
|
||||
if (_jobs.get(player).isEmpty()) {
|
||||
_jobs.remove(player);
|
||||
return null;
|
||||
}
|
||||
Job job = _jobs.get(player).pop();
|
||||
@ -88,17 +89,20 @@ public class Cache {
|
||||
return null;
|
||||
}
|
||||
if (_last_jobs_player == null) {
|
||||
return _jobs.keySet().iterator().next();
|
||||
_last_jobs_player = _jobs.keySet().iterator().next();
|
||||
return _last_jobs_player;
|
||||
}
|
||||
boolean found = false;
|
||||
for (String key : _jobs.keySet()) {
|
||||
if (found) {
|
||||
_last_jobs_player = key;
|
||||
return key;
|
||||
}
|
||||
if (key.equals(_last_jobs_player)) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
return _jobs.keySet().iterator().next();
|
||||
_last_jobs_player = _jobs.keySet().iterator().next();
|
||||
return _last_jobs_player;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user