-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added NPC and Hologram API #45
Open
NonSwag
wants to merge
28
commits into
main
Choose a base branch
from
npc-and-holo-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit deletes the Lombok compile-only and annotation processor dependencies from the build script.
Introduce a new Viewable interface to handle adding and removing players who can view objects in the game environment. This interface provides methods for managing viewers and tracking visibility to enhance control over object-player interactions.
Introduce interfaces for Hologram, HologramLine, and HologramController to manage and manipulate holograms. This includes methods for creating, managing, and retrieving hologram lines and instances, enhancing modularity and API structure.
Introduce interfaces Character, PlayerCharacter, and CharacterController to support NPC creation and management in the application. These interfaces provide methods for generating characters with various attributes and profiles. This change sets the foundation for extending NPC functionalities and integrating with the existing entity framework.
Introduce CharacterEvent as a base event class for character interactions and PlayerInteractCharacterEvent to handle player interaction with characters. The new classes include necessary methods and implement interfaces like Cancellable to manage event cancellations effectively.
The PlayerCharacter interface had redundant getProfile and setProfile methods that are already available in the Player interface. This change streamlines the interface by removing unnecessary methods, reducing potential confusion and maintenance effort.
This was
linked to
issues
Dec 7, 2024
Reorder methods in the Viewable interface and add new visibility-related methods. Introduce methods to handle object visibility state and display range management such as isInvisible, setVisibleByDefault, and setDisplayRange. This enhances control over how viewership is managed for objects implementing this interface.
This commit introduces a new enum, LineType, to categorize different types of content that can be used in holograms, including BLOCK, ENTITY, ITEM, and TEXT. Each enum constant is associated with a specific class type, enabling clearer distinctions and enforcing type safety within the hologram API. This addition enhances the flexibility and robustness of the hologram service by allowing structured
Revamp the HologramLine interface to extend from the Viewable interface and use generics for content type flexibility. Added methods for handling new attributes like EntityId, UUID, and location specifics to improve entity management. Updated existing methods to support setting and retrieving diverse content types more efficiently.
Removed Entity inheritance and introduced teleport methods using CompletableFuture for async operations. Added methods to manage hologram lines and properties, including glowing state, location, and server context, to improve control and flexibility.
This update enhances the HologramController by introducing entity-specific lines, allowing more flexible hologram content. Generics are applied to the `HologramLine` to ensure type safety across different line types. The method signatures have been updated accordingly to maintain consistency and clarity.
Renamed teleport methods to teleportAsync to prevent conflicts with superclass implementations of CraftEntity. This change ensures compatibility and prevents method name clashes that could cause issues in extended implementations.
Introduce a new interface Persistable to manage persistence logic. This interface extends Keyed and includes methods to check persistence status, persist an object, and set persistence state. This addition facilitates consistent handling of persistence across implementations.
Enhance the Viewable interface by adding methods to retrieve location, server, and world information. This update also introduces methods to access precise coordinates and orientation details such as x, y, z, pitch, and yaw. These additions provide a more comprehensive framework for interacting with viewable entities in the service API.
Hologram and Character interfaces now extend the Persistable interface, enhancing the capability to persist their state.
Relocated location-related methods from Hologram and HologramLine classes to the Viewable interface to improve code organization and modularity. This change centralizes functionality in the Viewable interface, promoting reusability and cleaner class structures.
The methods isGlowing() and setGlowing(boolean glowing) have been deleted from the Hologram interface.
Introduced two new methods, removeLine by index and by object, to enhance the functionality of the Hologram interface. These additions provide greater flexibility for managing hologram lines by allowing removal based on either the index or the specific line object.
Remove the use of Optional in the createCharacter method, returning a Character directly. This change clarifies the API by ensuring a Character is always returned, allowing for more straightforward usage of this method.
This update includes DecentHolograms version 2.8.12 as a compile-only dependency in the build configuration. The change also registers DecentHolograms as a server dependency that loads before others but is not required. This integration supports enhanced hologram features in the plugin.
Simplified the `LineType` enum and restructured the `HologramController` to support named holograms and entity types. Introduced the `Positioned` interface, clarifying positioning logic by removing redundant methods in `Viewable` and `HologramLine`. Added methods for bulk line operations in `Hologram`, improving API usability.
Introduce DecentHologram and related classes to integrate with the `eu.decentsoftware.holograms` API. This addition includes comprehensive support for creating, managing, and manipulating hologram lines of various types such as text, block, entity, and item. The commit enhances the system's capability to handle complex hologram structures using the DecentHologramController.
Implemented the getName method in both HologramController interface and DecentHologramController class. This change is intended to return the name of the hologram implementation being used, providing more clarity and consistency across the codebase.
Introduce HologramController and integrate DecentHologramController for hologram services. Implement methods to load and hook hologram services with appropriate logging and service registration. This change enhances the plugin's functionality by supporting hologram features.
Introduced a new private method to load economy services, emphasizing it is for debugging and print purposes only. This change involves initializing the EconomyController in a similar fashion to other services, but with no operational effect beyond logging.
Streamlined the service provider logging logic to reduce complexity and improve readability. Added logging for economy and hologram providers, ensuring all relevant providers are checked and logged consistently. This change improves maintainability and helps quickly identify available or missing service providers.
This commit introduces the HologramArgumentType to manage hologram-related arguments within commands and updates the ServiceConvertCommand to handle hologram conversions. The HologramConverter class facilitates the conversion of holograms between different controllers by migrating properties such as viewers, display range, and visibility attributes.
Implement support for hologram services by adding relevant properties, commands, and methods. This update includes error messages for missing hologram services and extends the ServiceInfoCommand to handle hologram information.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NPC Services
Hologram Services