InteractionSetSnapshotSourceCommand class
Пакет: com.hypixel.hytale.server.core.modules.interaction.commands
Файл: com/hypixel/hytale/server/core/modules/interaction/commands/InteractionSetSnapshotSourceCommand.java
extends: CommandBase
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
|
SelectInteraction.SnapshotSource |
var2 |
Методы (1)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
abstract |
|
super super("set", "server.commands.interaction.snapshotSource.set.desc") |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.interaction.commands;
class="kw">import com.hypixel.hytale.server.core.Message;
class="kw">import com.hypixel.hytale.server.core.command.system.CommandContext;
class="kw">import com.hypixel.hytale.server.core.command.system.arguments.system.RequiredArg;
class="kw">import com.hypixel.hytale.server.core.command.system.arguments.types.EnumArgumentType;
class="kw">import com.hypixel.hytale.server.core.command.system.basecommands.CommandBase;
class="kw">import com.hypixel.hytale.server.core.modules.interaction.interaction.config.none.SelectInteraction;
class="kw">import javax.annotation.Nonnull;
class="kw">public class InteractionSetSnapshotSourceCommand class="kw">extends CommandBase {
@Nonnull
class="kw">private class="kw">static class="kw">final EnumArgumentType<SelectInteraction.SnapshotSource> SNAPSHOT_SOURCE_ARG_TYPE = new EnumArgumentType<>(
"server.commands.parsing.argtype.snapshotsource.name", SelectInteraction.SnapshotSource.class
);
@Nonnull
class="kw">private class="kw">final RequiredArg<SelectInteraction.SnapshotSource> snapshotSourceArg = this.withRequiredArg(
"snapshotSource", "server.commands.interaction.snapshotSource.set.snapshotSource.desc", SNAPSHOT_SOURCE_ARG_TYPE
);
class="kw">public InteractionSetSnapshotSourceCommand() {
super("set", "server.commands.interaction.snapshotSource.set.desc");
}
@Override
class="kw">protected void executeSync(@Nonnull CommandContext var1) {
SelectInteraction.SnapshotSource var2 = this.snapshotSourceArg.get(var1);
SelectInteraction.SNAPSHOT_SOURCE = var2;
var1.sendMessage(Message.translation("server.commands.interaction.snapshotSource.set").param("source", var2.name()));
}
}