EnableTmpTagsCommand class

Пакет: com.hypixel.hytale.server.core.modules.i18n.commands

Файл: com/hypixel/hytale/server/core/modules/i18n/commands/EnableTmpTagsCommand.java

extends: CommandBase

Поля (2)

МодификаторыТипИмя
HytaleServerConfig var2
boolean var3

Методы (2)

МодификаторыВозвратСигнатура
if if(var2 != null)
abstract super super("toggletmptags", "server.commands.toggleTmpTags.desc")

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.i18n.commands;

class="kw">import com.hypixel.hytale.server.core.HytaleServer;
class="kw">import com.hypixel.hytale.server.core.HytaleServerConfig;
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.basecommands.CommandBase;
class="kw">import javax.annotation.Nonnull;

class="kw">public class EnableTmpTagsCommand class="kw">extends CommandBase {
   class="kw">public EnableTmpTagsCommand() {
      super("toggletmptags", "server.commands.toggleTmpTags.desc");
      this.addAliases("tmptag", "tmptags", "tmpstring", "tmpstrings", "tmptext");
   }

   @Override
   class="kw">protected void executeSync(@Nonnull CommandContext var1) {
      HytaleServerConfig var2 = HytaleServer.get().getConfig();
      if (var2 != null) {
         boolean var3 = !var2.isDisplayTmpTagsInStrings();
         var2.setDisplayTmpTagsInStrings(!var3);
         var1.sendMessage(Message.translation("server.commands.toggleTmpTags." + (var3 ? "enabled" : "disabled")));
      }
   }
}