-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
type: enhancementNew feature or requestNew feature or request
Description
Description
Sometimes, GUIs are only meant to be used by one player. However, since the API is designed to work with multiple players, it can be cumbersome when you know beforehand that only one player should see the GUI at a time.
This could be accomplished by adding convenience methods, like Gui#getViewer() which would return the first viewer in the viewers list (equivalent to gui.getViewers().get(0)).
Another idea is to introduce a ViewerPolicy, such as EVERYONE (the default), FIRST_ONLY (only the first to open it), SINGLE (when a new viewer is added, the old one gets removed).
Challenges
- Handling changes of the
ViewerPolicy(e.g. switching fromEVERYONEtoSINGLE)
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request