public abstract static class GameRules.Rule<T extends GameRules.Rule<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected GameRules.Type<T> |
type |
Constructor and Description |
---|
Rule(GameRules.Type<T> type) |
Modifier and Type | Method and Description |
---|---|
protected void |
changed(MinecraftServer server) |
protected abstract T |
copy() |
protected abstract void |
deserialize(String value) |
abstract int |
getCommandResult() |
protected abstract T |
getThis() |
abstract String |
serialize() |
void |
set(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
String name) |
protected abstract void |
setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
String name) |
abstract void |
setValue(T rule,
MinecraftServer server) |
String |
toString() |
protected final GameRules.Type<T extends GameRules.Rule<T>> type
public Rule(GameRules.Type<T> type)
protected abstract void setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
public void set(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
protected void changed(@Nullable MinecraftServer server)
protected abstract void deserialize(String value)
public abstract String serialize()
public abstract int getCommandResult()
protected abstract T getThis()
protected abstract T copy()
@Environment(value=CLIENT) public abstract void setValue(T rule, @Nullable MinecraftServer server)