Class CommonNpc<W,P,I,E>
java.lang.Object
com.github.juliarn.npclib.common.flag.CommonNpcFlaggedObject
com.github.juliarn.npclib.common.npc.CommonNpc<W,P,I,E>
- All Implemented Interfaces:
com.github.juliarn.npclib.api.flag.NpcFlaggedObject,com.github.juliarn.npclib.api.Npc<W,P, I, E>
public class CommonNpc<W,P,I,E>
extends CommonNpcFlaggedObject
implements com.github.juliarn.npclib.api.Npc<W,P,I,E>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.juliarn.npclib.api.Npc
com.github.juliarn.npclib.api.Npc.Builder<W,P, I, E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final com.github.juliarn.npclib.api.settings.NpcSettings<P> protected final com.github.juliarn.npclib.api.Positionprotected final com.github.juliarn.npclib.api.profile.Profile.Resolvedprotected final WFields inherited from class com.github.juliarn.npclib.common.flag.CommonNpcFlaggedObject
flagsFields inherited from interface com.github.juliarn.npclib.api.Npc
HIT_WHEN_PLAYER_HITS, LOOK_AT_PLAYER, SNEAK_WHEN_PLAYER_SNEAKS -
Constructor Summary
ConstructorsConstructorDescriptionCommonNpc(@NotNull Map<com.github.juliarn.npclib.api.flag.NpcFlag<?>, Optional<?>> flags, int entityId, com.github.juliarn.npclib.api.profile.Profile.Resolved profile, W world, @NotNull com.github.juliarn.npclib.api.Position pos, @NotNull com.github.juliarn.npclib.api.Platform<W, P, I, E> platform, @NotNull com.github.juliarn.npclib.api.settings.NpcSettings<P> npcSettings) -
Method Summary
Modifier and TypeMethodDescriptionaddIncludedPlayer(P player) changeItem(@NotNull com.github.juliarn.npclib.api.protocol.enums.ItemSlot slot, I item) changeMetadata(@NotNull com.github.juliarn.npclib.api.protocol.meta.EntityMetadataFactory<T, O> metadata, T value) intentityId()booleanforceTrackPlayer(P player) inthashCode()@UnmodifiableView @NotNull Collection<P> booleanincludesPlayer(P player) lookAt(@NotNull com.github.juliarn.npclib.api.Position position) platform()playAnimation(@NotNull com.github.juliarn.npclib.api.protocol.enums.EntityAnimation animation) @NotNull com.github.juliarn.npclib.api.Positionposition()com.github.juliarn.npclib.api.profile.Profile.Resolvedprofile()removeIncludedPlayer(P player) rotate(float yaw, float pitch) @NotNull com.github.juliarn.npclib.api.settings.NpcSettings<P> settings()booleanshouldIncludePlayer(P player) stopTrackingPlayer(P player) @UnmodifiableView @NotNull Collection<P> trackPlayer(P player) booleantracksPlayer(P player) unlink()world()Methods inherited from class com.github.juliarn.npclib.common.flag.CommonNpcFlaggedObject
flagValue, flagValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.juliarn.npclib.api.flag.NpcFlaggedObject
flagValue, flagValue, flagValueOrDefault
-
Field Details
-
entityId
protected final int entityId -
profile
protected final com.github.juliarn.npclib.api.profile.Profile.Resolved profile -
world
-
pos
protected final com.github.juliarn.npclib.api.Position pos -
platform
-
npcSettings
-
trackedPlayers
-
includedPlayers
-
-
Constructor Details
-
CommonNpc
public CommonNpc(@NotNull @NotNull Map<com.github.juliarn.npclib.api.flag.NpcFlag<?>, Optional<?>> flags, int entityId, @NotNull com.github.juliarn.npclib.api.profile.Profile.Resolved profile, @NotNull W world, @NotNull @NotNull com.github.juliarn.npclib.api.Position pos, @NotNull @NotNull com.github.juliarn.npclib.api.Platform<W, P, I, E> platform, @NotNull @NotNull com.github.juliarn.npclib.api.settings.NpcSettings<P> npcSettings)
-
-
Method Details
-
entityId
public int entityId() -
profile
@NotNull public com.github.juliarn.npclib.api.profile.Profile.Resolved profile() -
world
-
position
@NotNull public @NotNull com.github.juliarn.npclib.api.Position position() -
settings
-
platform
-
npcTracker
-
shouldIncludePlayer
-
includedPlayers
-
includesPlayer
-
addIncludedPlayer
-
removeIncludedPlayer
-
unlink
-
trackedPlayers
-
tracksPlayer
-
trackPlayer
-
forceTrackPlayer
-
stopTrackingPlayer
-
rotate
-
lookAt
-
playAnimation
-
changeItem
-
changeMetadata
-
hashCode
public int hashCode() -
equals
-