-
-
Notifications
You must be signed in to change notification settings - Fork 74
Cast object to class like as it is done in JOOQ #535
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Description
Description
Record#get(String var1, Class<? extends U> var2)
For example:
String item = entry.get("item", String.class);
double chance = entry.get("chance", Double.class);
double range = entry.get("range", Double.class);
Expected code
new CommandAPICommand("test").withPermission("*")
.withArguments(new FloatArgument("chance"), new FloatArgument("range"))
.executesPlayer((player, args) -> {
float chance = args.get("chance", float.class);
float range = args.get("range", float.class);
});
Extra details
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release