HoshiKurama / TicketManager

Minecraft plugin designed to implement a ticketing system
GNU Affero General Public License v3.0
16 stars 4 forks source link

Place holders? #14

Closed cb12438 closed 2 years ago

cb12438 commented 2 years ago

Is their anyplace holders for this like %opentickets% that will like show the amount of open tickets and stuff like that if its not added i think it would be cool thanks though!

HoshiKurama commented 2 years ago

Hey there! Currently there's only the \<Open> template under Notify_OpenAssigned. That's the message sent every once in a while telling staff how many tickets are open. I don't think I can implement that everywhere since it's a database operation, which can slow down notifications.

However, if you want to know the number of tickets open at any given time, you can always do a ticket search! /ticket search status:OPEN should do it.

cb12438 commented 2 years ago

Alr yea thats nice to know thanks! i was making a sidebar and it was going to have currently open tickets on it and it would list the amount of open tickets and thanks for the fast response!

HoshiKurama commented 2 years ago

Of course! I'm happy I could help! Are you coding the sidebar in Java?

cb12438 commented 2 years ago

No its done with a plugin sadly by default i dont know much java

is thier possibly a hook with java you can do to get the number of tickets open if so i might have a freind who can code a plugin?

cb12438 commented 2 years ago

Also is thier a discord for this plugin? by chance sorry

HoshiKurama commented 2 years ago

Ahhh, I gotcha. Yeah, TicketManager doesn't support the PlaceholderAPI.

Getting PlaceholderAPI wouldn't be particularly difficult as far as what you're asking. I'm just not sure if I should do it. PlaceholderAPI seems to be for if the plugin can immediately provide a particular value. TicketManager works very different on the inside and can't guarantee a result immediately. I can force it to wait for the value, but depending on how the API handles things, it could result in lots of lag!

The best option would probably be expose that functionality through my own API, but I'll continue to do some research and look into it for you!

As for discord, I sadly do not have a server dedicated to this plugin at the moment.

cb12438 commented 2 years ago

Alr thanks either way its fine thanks for trying either way though!

HoshiKurama commented 2 years ago

Closing this ticket as it's not possible to add support for the PlaceholderAPI. Exposing TM through a simple API is possible, but no one has requested such a feature.