WorldPathRemoveCommand class

Пакет: com.hypixel.hytale.builtin.path.commands

Файл: com/hypixel/hytale/builtin/path/commands/WorldPathRemoveCommand.java

extends: AbstractWorldCommand

Поля (1)

МодификаторыТипИмя
String var4

Методы (1)

МодификаторыВозвратСигнатура
abstract super super("remove", "server.commands.worldpath.remove.desc")

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.path.commands;

class="kw">import com.hypixel.hytale.component.Store;
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.ArgTypes;
class="kw">import com.hypixel.hytale.server.core.command.system.basecommands.AbstractWorldCommand;
class="kw">import com.hypixel.hytale.server.core.universe.world.World;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;

class="kw">public class WorldPathRemoveCommand class="kw">extends AbstractWorldCommand {
   @Nonnull
   class="kw">private class="kw">final RequiredArg<String> nameArg = this.withRequiredArg("name", "server.commands.worldpath.remove.name.desc", ArgTypes.STRING);

   class="kw">public WorldPathRemoveCommand() {
      super("remove", "server.commands.worldpath.remove.desc");
   }

   @Override
   class="kw">protected void execute(@Nonnull CommandContext var1, @Nonnull World var2, @Nonnull Store<EntityStore> var3) {
      String var4 = this.nameArg.get(var1);
      if (var2.getWorldPathConfig().removePath(var4) == null) {
         var1.sendMessage(Message.translation("server.universe.worldpath.noPathFound").param("path", var4));
      } else {
         var1.sendMessage(Message.translation("server.universe.worldpath.removed").param("path", var4));
      }
   }
}