mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Fix duplicate IDs in ids-for-ip list
This commit is contained in:
parent
87be292538
commit
dc7efc2642
@ -321,13 +321,11 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||||||
ids_by_ip.put(ip, ids);
|
ids_by_ip.put(ip, ids);
|
||||||
}
|
}
|
||||||
String pid = p.getName();
|
String pid = p.getName();
|
||||||
/* See if not first in list */
|
if(ids.indexOf(pid) != 0) {
|
||||||
int idx = ids.indexOf(pid);
|
ids.remove(pid); /* Remove from list */
|
||||||
if(idx > 0) {
|
|
||||||
ids.remove(idx);
|
|
||||||
}
|
|
||||||
ids.addFirst(pid); /* Put us first on list */
|
ids.addFirst(pid); /* Put us first on list */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* And re-attach to active jobs */
|
/* And re-attach to active jobs */
|
||||||
if(mapManager != null)
|
if(mapManager != null)
|
||||||
mapManager.connectTasksToPlayer(p);
|
mapManager.connectTasksToPlayer(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user