Class ScenarioDescriptor
A descriptor is immutable and is supplied once by Scenario.descriptor(). Built-in and
third-party scenarios use exactly the same descriptor, so a registered addon scenario appears in
the commands, GUIs, voting pools, automatic-selection pools, validation and API lookups on equal
footing with the ones Zentrix ships.
There is no fixed category list. tags() is free-form and exists purely so a scenario
can group or filter itself however its author likes.
- Since:
- 1.6.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionThe lines announced to a match once its players are in the arena.authors()static @NotNull ScenarioDescriptor.Builder@NotNull Set<ScenarioCapability> The gameplay areas this scenario takes charge of.@NotNull Set<ScenarioCapability> The gameplay areas this scenario cannot share a match with.IDs of scenarios that must never be active alongside this one.IDs of scenarios that must be active alongside this one.The description lines shown in the GUIs.@NotNull StringThe name shown to players and administrators.booleanWhether the scenario counts as enabled until an administrator says otherwise.@NotNull org.bukkit.Materialicon()The icon used wherever the scenario is listed.@NotNull Stringid()The stable lower-case identifier used in configuration, commands and API lookups.intpriority()The activation and hook order of this scenario.booleanprovides(@Nullable ScenarioCapability capability) Whether this scenario declared it takes charge of a capability.Names of Bukkit plugins that must be enabled for this scenario to be selectable.@NotNull Map<String, ScenarioSetting> settings()The scenario's configurable values, keyed by setting key, in declaration order.tags()Free-form labels; Zentrix imposes no category system of its own.toString()@NotNull Stringversion()The scenario's own version string, for addon diagnostics.booleanvotable()Whether players may vote for this scenario.
-
Method Details
-
id
The stable lower-case identifier used in configuration, commands and API lookups. -
displayName
The name shown to players and administrators. -
description
The description lines shown in the GUIs. -
announcement
The lines announced to a match once its players are in the arena.Zentrix sends one announcement per scenario a match runs, spaced out by the delay configured in
scenarios.yml. A server owner may override these lines underscenarios.announcements.scenarios.<id>in the locale file, which is why this is only the wording the scenario itself suggests. An empty list falls back to the locale's shared announcement layout, built fromdisplayName()anddescription().Lines carry the usual Zentrix formatting:
&cand&#RRGGBBcolors and<center>...</center>tags. -
icon
@NotNull public @NotNull org.bukkit.Material icon()The icon used wherever the scenario is listed. -
version
The scenario's own version string, for addon diagnostics. -
authors
-
priority
public int priority()The activation and hook order of this scenario.A higher priority activates earlier and sees gameplay hooks first, which is what makes a combination of scenarios deterministic. Scenarios sharing a priority are ordered by ID.
-
dependencies
IDs of scenarios that must be active alongside this one. -
conflicts
IDs of scenarios that must never be active alongside this one. -
capabilities
The gameplay areas this scenario takes charge of.Anything declared here makes the scenario incompatible with every scenario that conflicts with the same capability, whether or not the two know about each other.
-
capabilityConflicts
The gameplay areas this scenario cannot share a match with.Every scenario providing one of these conflicts with this one. Declaring the same capability in both sets forms a mutual-exclusion group: any two members conflict, and the group stays open to scenarios written later.
-
provides
Whether this scenario declared it takes charge of a capability. -
requiredPlugins
Names of Bukkit plugins that must be enabled for this scenario to be selectable. -
tags
Free-form labels; Zentrix imposes no category system of its own. -
settings
The scenario's configurable values, keyed by setting key, in declaration order. -
setting
-
votable
public boolean votable()Whether players may vote for this scenario. -
enabledByDefault
public boolean enabledByDefault()Whether the scenario counts as enabled until an administrator says otherwise.Built-in scenarios ship enabled. A dynamically registered scenario normally leaves this false, so it stays inert until somebody configures it.
-
builder
-
toString
-