BuilderToolsUserData
Package: com.hypixel.hytale.builtin.buildertools
public class BuilderToolsUserData implements Component<EntityStore>An EntityStore component that stores per-player builder tools preferences. Registered with component ID "BuilderTools" during BuilderToolsPlugin setup. Currently tracks a single setting: whether changes to the block selection box are recorded in the undo/redo history.
Constants
Section titled “Constants”public static final String ID = "BuilderTools"The component registration ID.
public static final BuilderCodec<BuilderToolsUserData> CODECSerialization codec with a single "SelectionHistory" boolean field.
Static Methods
Section titled “Static Methods”@Nonnullpublic static BuilderToolsUserData get(@Nonnull Player player)Returns the BuilderToolsUserData component from the player’s entity holder, or a new default instance if the component is not present.
getComponentType
Section titled “getComponentType”public static ComponentType<EntityStore, BuilderToolsUserData> getComponentType()Returns the registered ComponentType from the plugin singleton.
Instance Methods
Section titled “Instance Methods”isRecordingSelectionHistory
Section titled “isRecordingSelectionHistory”public boolean isRecordingSelectionHistory()Returns true if selection changes should be recorded in the undo/redo history. Defaults to true.
setRecordSelectionHistory
Section titled “setRecordSelectionHistory”public void setRecordSelectionHistory(boolean selectionHistory)Sets whether selection changes are recorded in the undo/redo history.
@Nonnull@Overridepublic Component<EntityStore> clone()Returns a deep copy of this component with the same selectionHistory value.
toString
Section titled “toString”@Nonnull@Overridepublic String toString()Returns a string representation including the selectionHistory field value.
equals / hashCode
Section titled “equals / hashCode”Standard equals() and hashCode() implementations based on the selectionHistory field.
Related Types
Section titled “Related Types”- BuilderToolsPlugin — registers this component type during setup
- BuilderToolsUserDataSystem — ensures this component is present on all player entities
- BuilderToolsPlugin.BuilderState — reads
selectionHistoryto determine undo behavior