This is necessary to ensure a robust /ma spec command. If no spectator
warp is set, the command will throw an NPE - it is much more safe and
sane to require the warp.
The items-node in the classes section now supports list values instead
of strictly string-values. This should make it easier to see exactly
which items a class has, and it should alleviate some of the problems
associated with apostrophes and such. The string-valued setup is still
supported to preserve some backwards compatibility.
The armor-node remains untouched, but it will probably be updated to
the same system later.
The notion of a "selected arena" disappears with this commit. All
commands that previously did not require an arena name in the case
of multiple arenas now do, i.e. it is no longer possible to "set"
an arena to be the target of commands. This should not be an issue,
however, since Setup Mode replaces all the commands that previously
were the main reason for the notion of a selected arena.
The /ma setup <arena> command is the first step in the process of
making the setup procedure more intuitive. The command consists of
the actual command handling, as well as a multi-role inner class,
and together they constitute Setup Mode.
- Toolbox; a set of tools are provided to the user, and a handler
for the interact event will react to the usage of these tools,
providing the primary, interactive element of Setup Mode. The
tools are used to set regions, warps and points.
- Text input; by typing 'exp', the user can expand a given region
in the typical directions (up, down, out), and by typing 'show',
the user can request red wool blocks to be displayed in place of
region frames, warps and points.
Whilst in Setup Mode, the user cannot type any commands, because
the input is intercepted due to the Conversations API - this is
by design, and may prevent some inconsistencies.
The next step in the process will be to fully remove the commands
that Setup Mode renders obsolete. The commands include, but are
not limited to:
- set(lobby)region
- expand(lobby)region
- setwarp
- addspawn
- delspawn
- addchest
- delchest
- The execute() method has had its docs redefined to reflect how the
CommandHandler now handles the return value of the method. That is,
if the method returns false, the CommandHandler prints the usage
message and description of the command to the command sender.
- Commands now only return false when they should, according to the
updated docs of the execute() method.
- Most commands have been tidied up a bit, i.e. they've had some
unnecessary code removed in the advent of the new usage printing
of the CommandHandler.
- Some commands have had their patterns altered slightly.
- The order of command registration now matters. That is, the order
commands are registered in will be the order in which the help
screen will display the command usages and descriptions.
- The help screen now shows ordered commands, and separates the
types into user, admin and setup sections for a better overview.
This commit transforms the announcements system in the following way:
- announcements.yml makes it easier to add missing nodes and remove
obsolete ones. This way, users don't have to delete their previous
announcements-file to get the new keys.
- Color codes are supported in the fact that when an announcement
message is "set()", the string value has all of its &-symbols
translated.
- No need for a defaults-file, because the enum is very easy to
compile into a YAML file.