You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This API allows you to request a string from a user via either a specific method or a method of the user's choice. The user can change their method of choice via /advancedcore SetRequestMethod (RequestMethod).
Example (Take from my user gui):
public void openUsersGUI(Player player) {
ArrayList<String> players = new ArrayList<String>();
for (Player p : Bukkit.getOnlinePlayers()) {
players.add(p.getName());
}
new ValueRequest().requestString(player, "", Utils.getInstance()
.convertArray(players), true, new StringListener() {
@Override
public void onInput(Player player, String value) {
setCurrentPlayer(player, value);
openUserGUI(player, value);
}
});
}
Source code for the value request for it can be found here and javadoc here.