Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
获取 gui 是否已经注册的函数添加
Browse files Browse the repository at this point in the history
  • Loading branch information
u2g committed Nov 3, 2016
1 parent 4b62dcf commit 1026e80
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/com/minecraft/moonlake/gui/api/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,13 @@ public interface GUI {
*/
ObjectProperty<Execute<GUIEventHandler>> getCloseExecute();

/**
* 获取此 GUI 对象是否已经注册
*
* @return 是否已经注册
*/
boolean isRegistered();

/**
* 获取此 GUI 对象是否符合目标对象
*
Expand Down
11 changes: 11 additions & 0 deletions src/com/minecraft/moonlake/gui/util/GUIReference.java
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,17 @@ public ObjectProperty<Execute<GUIEventHandler>> getCloseExecute() {
return closeHandlerExecuteProperty;
}

/**
* 获取此 GUI 对象是否已经注册
*
* @return 是否已经注册
*/
@Override
public boolean isRegistered() {

return GUIPlugin.getManagers().hasGUI(this);
}

@Override
public final int hashCode() {

Expand Down

0 comments on commit 1026e80

Please sign in to comment.