Skip to content

Axis Argument

Any non-repeating combination of the characters 'x', 'y', and 'z'. Returns EnumSet<Axis>. Example:

Java
new StellarCommand("test")
    .addAxisArgument("axis")
    .addExecution(Player.class, context -> {
        EnumSet<Axis> axes = getArgument<EnumSet<Axis>>("axis");
        List<String> stringifiedAxes = axes.stream().map(Axis::getName()).collect(Collectors.toList());
        String message = String.join(", ", stringifiedAxes);
        context.getSender().sendMessage(message);
    });

Axis Argument

Released under the MIT License.