Fixed blank lines being sent on disable

Dieser Commit ist enthalten in:
Wizjany 2011-05-30 23:58:32 -04:00
Ursprung 281db091b8
Commit f9aa5910f2
2 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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.
* *

Datei anzeigen

@ -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();
} }