mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
when PlayerQuitEvent is never called
This commit is contained in:
parent
59557cf889
commit
5ddefcea22
@ -115,14 +115,23 @@ public class UUIDHandler {
|
||||
if (implementation == null) {
|
||||
return null;
|
||||
}
|
||||
return implementation.getPlayer(uuid);
|
||||
return check(implementation.getPlayer(uuid));
|
||||
}
|
||||
|
||||
public static PlotPlayer getPlayer(String name) {
|
||||
if (implementation == null) {
|
||||
return null;
|
||||
}
|
||||
return implementation.getPlayer(name);
|
||||
return check(implementation.getPlayer(name));
|
||||
}
|
||||
|
||||
private static PlotPlayer check(PlotPlayer plr) {
|
||||
if (plr != null && !plr.isOnline()) {
|
||||
UUIDHandler.getPlayers().remove(plr.getName());
|
||||
PS.get().IMP.unregister(plr);
|
||||
plr = null;
|
||||
}
|
||||
return plr;
|
||||
}
|
||||
|
||||
public static UUID getUUIDFromString(String nameOrUUIDString) {
|
||||
|
Loading…
Reference in New Issue
Block a user