PlayerViewRadiusGetCommand class
Пакет: com.hypixel.hytale.server.core.command.commands.player.viewradius
Файл: com/hypixel/hytale/server/core/command/commands/player/viewradius/PlayerViewRadiusGetCommand.java
extends: AbstractTargetPlayerCommand
Поля (5)
| Модификаторы | Тип | Имя |
|---|---|---|
|
int |
var10 |
|
int |
var11 |
|
Player |
var7 |
|
EntityTrackerSystems.EntityViewer |
var8 |
|
int |
var9 |
Методы (1)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
abstract |
|
super super("get", "server.commands.player.viewradius.get.desc") |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.command.commands.player.viewradius;
class="kw">import com.hypixel.hytale.component.Ref;
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.basecommands.AbstractTargetPlayerCommand;
class="kw">import com.hypixel.hytale.server.core.entity.entities.Player;
class="kw">import com.hypixel.hytale.server.core.modules.entity.tracker.EntityTrackerSystems;
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">import javax.annotation.Nullable;
class="kw">public class PlayerViewRadiusGetCommand class="kw">extends AbstractTargetPlayerCommand {
class="kw">public PlayerViewRadiusGetCommand() {
super("get", "server.commands.player.viewradius.get.desc");
}
@Override
class="kw">protected void execute(
@Nonnull CommandContext var1,
@Nullable Ref<EntityStore> var2,
@Nonnull Ref<EntityStore> var3,
@Nonnull PlayerRef var4,
@Nonnull World var5,
@Nonnull Store<EntityStore> var6
) {
Player var7 = var6.getComponent(var3, Player.getComponentType());
assert var7 != null;
EntityTrackerSystems.EntityViewer var8 = var6.getComponent(var3, EntityTrackerSystems.EntityViewer.getComponentType());
assert var8 != null;
int var9 = var7.getViewRadius();
int var10 = var7.getClientViewRadius();
int var11 = var8.viewRadiusBlocks;
var1.sendMessage(
Message.translation("server.commands.player.viewradius.info").param("radius", var9).param("clientRadius", var10).param("radiusBlocks", var11)
);
}
}