Skip to content

Conversation

@BlitzOffline
Copy link
Member

@BlitzOffline BlitzOffline commented Aug 28, 2022

This is work in progress and there is still a lot more to be done. Also not very well tested.

Ok some more information now that this is starting to gain a shape:

If everything works out right, other plugins won't need to add this plugin as a dependency since I've exposed the necessary stuff in the ChatChatAPI class.

Stuff exposed in ChatChatAPI:

  • The UserHolder (for getting and removing users)
  • The HookManager (for registering new hooks)
  • The ChannelTypeRegistry (for registering new channel types)
  • The RuleManager (for registering custom rules - read under for more info)
  • The MentionsManager (for registering custom mentions - read under for more info)
  • The MiniPlaceholdersManager (for registering custom tags - read under for more information)

Also other plugins will be able to get the ChatChatAPI instance using Bukkit's ServiceManager. Example:``

final RegisteredServiceProvider<ChatChatAPI> rsp = Bukkit.getServicesManager().getRegistration(ChatChatAPI.class)
if (rsp == null) {
  // Handle ChatChat missing here!
}
final ChatChatAPI api = rsp.getProvider();

Added:

  • The ChatChatAPI and all the managers it provides
  • Channel and Personal mention events (instead of them being the same)
  • FormatsHolders and GlobalFormatsHolders
  • Mentions - plugins can register their own custom mentions now
  • MiniPlaceholders - plugins can register their own custom minimessage tags now. ChatChat also has a way to make custom placeholders from a file called placeholders.yml
  • Rules - rules that apply to public and/or private chats. Messages sent by users need to respect those rules
  • Hooks - added a way to actually register hooks within ChatChat.

Closes #85
Closes #90
Closes #100
Closes #147

@BlitzOffline BlitzOffline marked this pull request as ready for review September 17, 2022 16:44
@BlitzOffline BlitzOffline requested a review from Kqliber October 7, 2022 20:26
@BlitzOffline BlitzOffline merged commit 7cb48a9 into HelpChat:main Oct 13, 2022
@BlitzOffline BlitzOffline deleted the feature/api-redesign branch October 13, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants