Fix forge relog

This commit is contained in:
Jesse Boyd 2018-08-22 20:39:44 +10:00
parent 9e6b3fabe4
commit 839a3151d5
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -143,6 +143,7 @@ public abstract class FawePlayer<T> extends Metadatable {
}
}
}
try {
VirtualWorld world = getSession().getVirtualWorld();
if (world != null) {
if (close) {
@ -151,9 +152,9 @@ public abstract class FawePlayer<T> extends Metadatable {
} catch (IOException e) {
e.printStackTrace();
}
} else world.clear();
}
else world.clear();
}
} catch (NoCapablePlatformException ignore) {}
return cancelled;
}
@ -612,6 +613,7 @@ public abstract class FawePlayer<T> extends Metadatable {
public void unregister() {
cancel(true);
if (Settings.IMP.HISTORY.DELETE_ON_LOGOUT) {
try {
session = getSession();
WorldEdit.getInstance().removeSession(toWorldEditPlayer());
session.setClipboard(null);
@ -622,6 +624,7 @@ public abstract class FawePlayer<T> extends Metadatable {
((BrushTool) tool).clear(getPlayer());
}
}
} catch (NoCapablePlatformException ignore) {}
}
Fawe.get().unregister(getName());
}