PlayerInteractEvent class
Пакет: com.hypixel.hytale.server.core.event.events.player
Файл: com/hypixel/hytale/server/core/event/events/player/PlayerInteractEvent.java
extends: PlayerEvent<String>
implements: ICancellable
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
final |
InteractionType |
actionType |
Методы (7)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
public |
InteractionType |
getActionTypeInteractionType getActionType() |
public |
long |
getClientUseTimelong getClientUseTime() |
public |
ItemStack |
getItemInHandItemStack getItemInHand() |
public |
Vector3i |
getTargetBlockVector3i getTargetBlock() |
public |
Entity |
getTargetEntityEntity getTargetEntity() |
public |
Ref<EntityStore> |
getTargetRefRef<EntityStore> getTargetRef() |
abstract |
|
super super(var1, var2) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.event.events.player;
class="kw">import com.hypixel.hytale.component.Ref;
class="kw">import com.hypixel.hytale.event.ICancellable;
class="kw">import com.hypixel.hytale.protocol.InteractionType;
class="kw">import com.hypixel.hytale.server.core.entity.Entity;
class="kw">import com.hypixel.hytale.server.core.entity.entities.Player;
class="kw">import com.hypixel.hytale.server.core.inventory.ItemStack;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;
class="kw">import org.joml.Vector3i;
@Deprecated
class="kw">public class PlayerInteractEvent class="kw">extends PlayerEvent<String> class="kw">implements ICancellable {
class="kw">private class="kw">final InteractionType actionType;
class="kw">private class="kw">final long clientUseTime;
class="kw">private class="kw">final ItemStack itemInHand;
class="kw">private class="kw">final Vector3i targetBlock;
class="kw">private class="kw">final Ref<EntityStore> targetRef;
class="kw">private class="kw">final Entity targetEntity;
class="kw">private boolean cancelled;
class="kw">public PlayerInteractEvent(
@Nonnull Ref<EntityStore> var1, @Nonnull Player var2, long var3, InteractionType var5, ItemStack var6, Vector3i var7, Ref<EntityStore> var8, Entity var9
) {
super(var1, var2);
this.actionType = var5;
this.clientUseTime = var3;
this.itemInHand = var6;
this.targetBlock = var7;
this.targetRef = var8;
this.targetEntity = var9;
}
@Override
class="kw">public boolean isCancelled() {
class="kw">return this.cancelled;
}
@Override
class="kw">public void setCancelled(boolean var1) {
this.cancelled = var1;
}
class="kw">public InteractionType getActionType() {
class="kw">return this.actionType;
}
class="kw">public long getClientUseTime() {
class="kw">return this.clientUseTime;
}
class="kw">public ItemStack getItemInHand() {
class="kw">return this.itemInHand;
}
class="kw">public Vector3i getTargetBlock() {
class="kw">return this.targetBlock;
}
class="kw">public Entity getTargetEntity() {
class="kw">return this.targetEntity;
}
class="kw">public Ref<EntityStore> getTargetRef() {
class="kw">return this.targetRef;
}
@Nonnull
@Override
class="kw">public String toString() {
class="kw">return "PlayerInteractEvent{actionType="
+ this.actionType
+ ", clientUseTime="
+ this.clientUseTime
+ ", itemInHand="
+ this.itemInHand
+ ", targetBlock="
+ this.targetBlock
+ ", targetEntity="
+ this.targetEntity
+ ", cancelled="
+ this.cancelled
+ "} "
+ super.toString();
}
}