Coder Social home page Coder Social logo

API? about chatcontrol-pro HOT 8 CLOSED

kangarko avatar kangarko commented on May 29, 2024
API?

from chatcontrol-pro.

Comments (8)

kangarko avatar kangarko commented on May 29, 2024

There's no API at the moment.
What exactly do you need. Please give me examples of implementation and I will consider adding it.

** Sun, 27 Mar 2016 09:29:24 -0700 - "kangarko/ChatControl-Pro" [email protected], "kangarko/ChatControl-Pro" [email protected] **

Is there an API available?
I'd need to hook in and send messages as well as set prefixes etc.

See Herochat's api for an example of what I need.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#17

from chatcontrol-pro.

JamieSinn avatar JamieSinn commented on May 29, 2024

You can find out information about channel-based messages by listening for a ChannelChatEvent. This custom event contains the message sender (a Chatter object), the channel the message is being sent to, the result of the messaging attempt (a Chatter.Result object), and the original Bukkit PlayerChatEvent that resulted in the ChannelChatEvent. If you change the channel the message is being sent to, you should call event.setResult(event.getSender().canSpeak(newChannel)) unless you want to ignore the normal checks before sending the message.

From herochat's bukkit dev page.

Specifically, I need the following

  • A way to get a channel's messages, and edit them or resend to another channel.
  • A way to send a message to a channel.
  • A way to have tag formatting that can be replaced when a player chats.

from chatcontrol-pro.

JamieSinn avatar JamieSinn commented on May 29, 2024

If this is too much, is it possible to just use the chat filtering part without using the chat channels and the related parts?

from chatcontrol-pro.

kangarko avatar kangarko commented on May 29, 2024

It's not too much :) Seems like I can implement a ChannelChatEvent, to which you can listen and act accordingly.

  • Sending a message to a channel will be implemented from the console. Then, you will be able to manually execute a console command without the need of an API.
  • I don't understand, what do you mean? You are able to catch AsyncPlayerChatEvent on a higher priority, after ChatControl, and furthermore edit the message to your likings.

But currently I have a very busy time, totally lack of any space for development honestly :/

from chatcontrol-pro.

JamieSinn avatar JamieSinn commented on May 29, 2024

Ah, that sounds good, no ETA needed.

In regards to the question later on: Is it possible to use the chat filtering for curse words part of this plugin without using the chat channels and the rest of this plugin.

from chatcontrol-pro.

kangarko avatar kangarko commented on May 29, 2024

Yes, you can turn off any part of the plugin except for rules, which also work with chat formatter disabled.

from chatcontrol-pro.

kangarko avatar kangarko commented on May 29, 2024

@JamieSinn hello! I am sorry for the delay :(

Here is the API I currently implemented:

me.kangarko.chatcontrol.api.ChannelAPI for manipulating with channels.
The event 'ChatChannelEvent' allows you to modify the message, format, recipients, or get information regarding the channel or even cancel the message before it's sent out.

I think it will be sufficient for you. The release is scheduled this week. Let me know if you have any inquiries.

from chatcontrol-pro.

JamieSinn avatar JamieSinn commented on May 29, 2024

Thanks! That should be great!

from chatcontrol-pro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.