mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-03 11:05:41 +00:00
when PlayerQuitEvent is never called
This commit is contained in:
parent
59557cf889
commit
5ddefcea22
1 changed files with 11 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue