SoundCommand class

Пакет: com.hypixel.hytale.server.core.command.commands.utility.sound

Файл: com/hypixel/hytale/server/core/command/commands/utility/sound/SoundCommand.java

extends: AbstractPlayerCommand

Поля (2)

МодификаторыТипИмя
Player var6
PlayerRef var7

Методы (1)

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

Исходный код

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

class="kw">import com.hypixel.hytale.component.Ref;
class="kw">import com.hypixel.hytale.component.Store;
class="kw">import com.hypixel.hytale.server.core.command.system.CommandContext;
class="kw">import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
class="kw">import com.hypixel.hytale.server.core.entity.entities.Player;
class="kw">import com.hypixel.hytale.server.core.entity.entities.player.pages.audio.PlaySoundPage;
class="kw">import com.hypixel.hytale.server.core.universe.PlayerRef;
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 SoundCommand class="kw">extends AbstractPlayerCommand {
   class="kw">public SoundCommand() {
      super("sound", "server.commands.sound.desc");
      this.setPermissionGroups("hytale:WorldEditor");
      this.addSubCommand(new SoundPlay2DCommand());
      this.addSubCommand(new SoundPlay3DCommand());
   }

   @Override
   class="kw">protected void execute(
      @Nonnull CommandContext var1, @Nonnull Store<EntityStore> var2, @Nonnull Ref<EntityStore> var3, @Nonnull PlayerRef var4, @Nonnull World var5
   ) {
      Player var6 = var2.getComponent(var3, Player.getComponentType());
      assert var6 != null;
      PlayerRef var7 = var2.getComponent(var3, PlayerRef.getComponentType());
      assert var7 != null;
      var6.getPageManager().openCustomPage(var3, var2, new PlaySoundPage(var7));
   }
}