Skip to content
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

add agatus proxy #323

Closed
wants to merge 3 commits into from

Conversation

anjeshshrestha
Copy link
Contributor

No description provided.


import eu.darkbot.api.managers.AgatusAPI;

public class AgatusEventProxy extends DefaultNpcEventProxy implements AgatusAPI {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like a pretty bad pattern to be extending a class without any changes at all. Is the issue here simply that this should be a higher-level api?

Instead of a DefaultNpcEventAPI maybe it should be a NpcEventAPI which returns a list or a map of NpcEvent objects.

interface NpcEventAPI {

  NpcEvent getEvent(EventType type);
  
  enum EventType {
    GENERIC, AGATUS, ...;
  }
}

The implementation can use the Agatus proxy and the generic npc event proxy, and in the plugin-side you can:
NpcEventAPI.getEvent(EventType.AGATUS) to get an NpcEvent with the info related to agatus.

@Pablete1234
Copy link
Member

Added in b902589

@Pablete1234 Pablete1234 closed this Jan 4, 2024
@anjeshshrestha anjeshshrestha deleted the agatus branch January 29, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants