mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 17:27:38 +00:00
Correctly unregister player on quit and close clipboard if using disk.
This commit is contained in:
parent
3cd30ebbff
commit
318e367cf0
@ -392,6 +392,7 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
|||||||
@Override
|
@Override
|
||||||
public void unregister() {
|
public void unregister() {
|
||||||
player.removeMetadata("WE", WorldEditPlugin.getInstance());
|
player.removeMetadata("WE", WorldEditPlugin.getInstance());
|
||||||
|
super.unregister();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -370,9 +370,10 @@ public interface Player extends Entity, Actor {
|
|||||||
default void unregister() {
|
default void unregister() {
|
||||||
cancel(true);
|
cancel(true);
|
||||||
if (Settings.IMP.HISTORY.DELETE_ON_LOGOUT) {
|
if (Settings.IMP.HISTORY.DELETE_ON_LOGOUT) {
|
||||||
getSession().setClipboard(null);
|
|
||||||
getSession().clearHistory();
|
getSession().clearHistory();
|
||||||
getSession().unregisterTools(this);
|
getSession().unregisterTools(this);
|
||||||
|
} else if (Settings.IMP.CLIPBOARD.USE_DISK) {
|
||||||
|
getSession().setClipboard(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user