public abstract class CartAttachment extends Object implements Attachment
Constructor and Description |
---|
CartAttachment() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsEntityId(int entityId)
Gets whether this attachment uses a particular Entity Id as part of
displaying its contents in the world.
|
MinecartMemberNetwork |
getController()
Gets the network controller that owns and manages this attachment
|
AttachmentInternalState |
getInternalState()
Gets controller internal state information.
|
int |
getMountEntityId()
Gets an Entity Id of an Entity other entities can mount to mount this attachment.
|
Collection<org.bukkit.entity.Player> |
getViewers()
Gets all the viewers of this attachment
|
void |
onAttached()
Called when the controller is attached to the real world.
|
void |
onDetached()
Called when the controller is detached from the real world.
|
void |
onLoad(com.bergerkiller.bukkit.common.config.ConfigurationNode config)
Called when the attachment need to (re)load the configuration.
|
void |
onTransformChanged(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Called right after the
Attachment.getTransform() has been updated. |
protected void |
updateGlowColor(UUID entityUUID,
org.bukkit.ChatColor color) |
protected void |
updateGlowColorFor(UUID entityUUID,
org.bukkit.ChatColor color,
org.bukkit.entity.Player viewer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAnimation, addChild, applyDefaultSeatTransform, clearAnimations, findChild, getAnimations, getChildren, getConfig, getConfiguredPosition, getCurrentAnimation, getManager, getParent, getPreviousTransform, getTransform, isActive, isAttached, isFocused, isHiddenWhenInactive, makeHidden, makeVisible, onBlur, onFocus, onMove, onTick, playNamedAnimation, playNamedAnimation, playNamedAnimationRecursive, playNamedAnimationRecursive, setActive, setFocused, startAnimation, stopAnimation
public AttachmentInternalState getInternalState()
Attachment
getInternalState
in interface Attachment
public void onAttached()
Attachment
onAttached
in interface Attachment
public void onDetached()
Attachment
#onSave(config)
is called
before this method is called, if saving is required.onDetached
in interface Attachment
public void onLoad(com.bergerkiller.bukkit.common.config.ConfigurationNode config)
Attachment
Attachment.onAttached()
is called for the first time,
and when configuration is reloaded while the attachment remains attached.
A guarantee is made that the attachment will be attached when this method is called.onLoad
in interface Attachment
config
- The configuration of the attachmentpublic Collection<org.bukkit.entity.Player> getViewers()
Attachment
getViewers
in interface Attachment
public MinecartMemberNetwork getController()
public boolean containsEntityId(int entityId)
Attachment
containsEntityId
in interface Attachment
public int getMountEntityId()
public void onTransformChanged(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Attachment
Attachment.getTransform()
has been updated.
Additional transformations can be performed here on the transformation matrix,
and position information can be calculated.onTransformChanged
in interface Attachment
transform
- (same as Attachment.getTransform()
but mutable)protected void updateGlowColorFor(UUID entityUUID, org.bukkit.ChatColor color, org.bukkit.entity.Player viewer)
protected void updateGlowColor(UUID entityUUID, org.bukkit.ChatColor color)
Copyright © 2019. All rights reserved.