NPCWorldCommandBase class
Пакет: com.hypixel.hytale.server.npc.commands
Файл: com/hypixel/hytale/server/npc/commands/NPCWorldCommandBase.java
extends: AbstractWorldCommand
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
|
Pair |
var4 |
Методы (5)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
abstract abstract |
void |
executevoid execute(@Nonnull CommandContext var1, @Nonnull NPCEntity var2, @Nonnull World var3, @Nonnull Store<EntityStore> var4, @Nonnull Ref<EntityStore> var5) |
|
|
if if(var4 != null) |
abstract |
|
super super(var1, var2) |
abstract |
|
super super(var1, var2, var3) |
abstract |
|
super super(var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.npc.commands;
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.arguments.types.ArgTypes;
class="kw">import com.hypixel.hytale.server.core.command.system.arguments.types.EntityWrappedArg;
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 com.hypixel.hytale.server.npc.entities.NPCEntity;
class="kw">import it.unimi.dsi.fastutil.Pair;
class="kw">import javax.annotation.Nonnull;
class="kw">public class="kw">abstract class NPCWorldCommandBase class="kw">extends AbstractWorldCommand {
@Nonnull
class="kw">protected class="kw">final EntityWrappedArg entityArg = this.withOptionalArg("entity", "server.commands.entity.entity.desc", ArgTypes.ENTITY_ID);
class="kw">public NPCWorldCommandBase(@Nonnull String var1, @Nonnull String var2) {
super(var1, var2);
}
class="kw">public NPCWorldCommandBase(@Nonnull String var1, @Nonnull String var2, boolean var3) {
super(var1, var2, var3);
}
class="kw">public NPCWorldCommandBase(@Nonnull String var1) {
super(var1);
}
class="kw">protected class="kw">abstract void execute(
@Nonnull CommandContext var1, @Nonnull NPCEntity var2, @Nonnull World var3, @Nonnull Store<EntityStore> var4, @Nonnull Ref<EntityStore> var5
);
@Override
class="kw">protected void execute(@Nonnull CommandContext var1, @Nonnull World var2, @Nonnull Store<EntityStore> var3) {
Pair var4 = NPCCommandUtils.getTargetNpc(var1, this.entityArg, var3);
if (var4 != null) {
this.execute(var1, (NPCEntity)var4.second(), var2, var3, (Ref<EntityStore>)var4.first());
}
}
}