Added method to force an Sui Window to be closed on the client

This commit is contained in:
Waverunner
2015-08-17 09:04:03 -04:00
parent 96f55028ef
commit 47c504b55f
4 changed files with 134 additions and 5 deletions
+18
View File
@@ -129,4 +129,22 @@ public final class IntentFactory {
public void showSuiWindow(Player player, SuiBaseWindow suiWindow) {
new SuiWindowIntent(player, suiWindow, SuiWindowIntent.SuiWindowEvent.NEW).broadcast();
}
/**
* Closes a currently opened window on the client with the id of the SUI Window
* @param player Player that has the window to be closed
* @param suiWindow {@link SuiBaseWindow} to be closed
*/
public void closeSuiWindow(Player player, SuiBaseWindow suiWindow) {
new SuiWindowIntent(player, suiWindow, SuiWindowIntent.SuiWindowEvent.CLOSE).broadcast();
}
/**
* Closes a currently opened window on the client with the id of the SUI Window
* @param player Player that has the window to be closed
* @param windowId Window id of the {@link SuiBaseWindow} to close
*/
public void closeSuiWindow(Player player, int windowId) {
new SuiWindowIntent(player, null, windowId, SuiWindowIntent.SuiWindowEvent.CLOSE).broadcast();
}
}