Class ExperimentData
java.lang.Object
org.skriptlang.skript.lang.experiment.ExperimentData
Container for holding
Experiment
s that must be enabled or disabled to use.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ExperimentData.Builder
builder()
Create and return a newExperimentData.Builder
.boolean
checkRequirements
(ExperimentSet experiments) Check if the requirements of thisExperimentData
are met.boolean
checkRequirementsAndError
(ExperimentSet experiments) Check if the requirements of thisExperimentData
are met.Construct aString
combining whatExperiment
s need to be enabled and/or disabled in order to use.static ExperimentData
createSingularData
(Experiment experiment) Create a newExperimentData
with only a singular requiredExperiment
@Unmodifiable Set
<Experiment> Get theExperiment
s that must be disabled in order to use.Get theString
used to error whencheckRequirementsAndError(ExperimentSet)
fails.@Unmodifiable Set
<Experiment> Get theExperiment
s that must be enabled in order to use.Get aExperimentData.Builder
with the current data of thisExperimentData
.
-
Method Details
-
builder
Create and return a newExperimentData.Builder
. -
createSingularData
Create a newExperimentData
with only a singular requiredExperiment
- Parameters:
experiment
- The requiredExperiment
.- Returns:
ExperimentData
-
getRequired
Get theExperiment
s that must be enabled in order to use. -
getDisallowed
Get theExperiment
s that must be disabled in order to use. -
getErrorMessage
Get theString
used to error whencheckRequirementsAndError(ExperimentSet)
fails. If theerrorMessage
was not manually set when buildingExperimentData.Builder
, uses the message fromconstructError()
. -
checkRequirements
Check if the requirements of thisExperimentData
are met.- Parameters:
experiments
- The current enabledExperiment
s.- Returns:
True
if the requirements were met.
-
checkRequirementsAndError
Check if the requirements of thisExperimentData
are met. If the requirements are not met, will produce aSkript.error(String)
usingerrorMessage
.- Parameters:
experiments
- The current enabledExperiment
s.- Returns:
True
if the requirements were met.
-
constructError
Construct aString
combining whatExperiment
s need to be enabled and/or disabled in order to use. -
toBuilder
Get aExperimentData.Builder
with the current data of thisExperimentData
.
-