Fixed blank lines being sent on disable

This commit is contained in:
Wizjany 2011-05-30 23:58:32 -04:00
parent 281db091b8
commit f9aa5910f2
2 changed files with 14 additions and 2 deletions

View File

@ -591,6 +591,15 @@ public class LocalSession {
} }
} }
/**
* Gets the status of CUI support.
*
* @return
*/
public boolean hasCUISupport() {
return hasCUISupport;
}
/** /**
* Sets the status of CUI support. * Sets the status of CUI support.
* *

View File

@ -110,10 +110,13 @@ public class WorldEditPlugin extends JavaPlugin {
* Called on plugin disable. * Called on plugin disable.
*/ */
public void onDisable() { public void onDisable() {
controller.clearSessions();
for (Player player : getServer().getOnlinePlayers()) { for (Player player : getServer().getOnlinePlayers()) {
wrapPlayer(player).dispatchCUIHandshake(); LocalPlayer lPlayer = wrapPlayer(player);
if (controller.getSession(lPlayer).hasCUISupport()) {
lPlayer.dispatchCUIHandshake();
} }
}
controller.clearSessions();
config.unload(); config.unload();
} }