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

API #49

Open
Vankka opened this issue Mar 30, 2020 · 5 comments
Open

API #49

Vankka opened this issue Mar 30, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@Vankka
Copy link

Vankka commented Mar 30, 2020

Hey, looking to hook Chatty into DiscordSRV, I'd need;

  • A way to figure out what channel a chat event went to (method or custom event)
  • A way to send messages to a specific channel
@Brikster
Copy link
Owner

Hello. I will make API classes as soon as possible)

@Brikster
Copy link
Owner

Hello! Sorry for a longtime pause.

I made API classes in dev. version. You can see them in repository now, check out "api" module. Version with API will be released soon.

Get access to API you can from "ru.mrbrikster.chatty.Chatty.class" instance: ((Chatty) Bukkit.getPlugin("Chatty")).api()

@Brikster Brikster added the enhancement New feature or request label Jul 21, 2020
@Brikster Brikster pinned this issue Jul 30, 2020
@Vankka
Copy link
Author

Vankka commented Sep 22, 2020

The main class (ru.mrbrikster.chatty.Chatty.class) isn't available within the api module, you may want to have a interface for the api method and have the main class implement that, so something like;

((IChatty) Bukkit.getPluginManager().getPlugin("Chatty")).api()

could be used, right now the only way is to use reflection or include the main plugin source as well

@Vankka
Copy link
Author

Vankka commented Jun 17, 2021

It seems that the API is giving no recipients, so messages being sent to Chats via the API are being sent to 0 players

@Brikster
Copy link
Owner

Brikster commented Jul 17, 2021

It gave no recipients with "single world" and local chats when using them with API.
New version fixed this issue, now you can send messages to any chat that have any range value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants