Byteflux / CombatTagPlus

Stop those dirty combat loggers!
17 stars 72 forks source link

Request for API #98

Closed lkoeninger closed 7 years ago

lkoeninger commented 7 years ago

Hey guys,

could you add a kind of API to your plugin that let other plugin developers request if a player is currently in combat? Would be a great extention :)

Maxopoly commented 7 years ago

https://github.com/MinelinkNetwork/CombatTagPlus/blob/master/CombatTagPlus/src/main/java/net/minelink/ctplus/TagManager.java#L123

lkoeninger commented 7 years ago

oh nice, thank you!!

lkoeninger commented 7 years ago

mh TagManager constructor is not public so it can not get instanciated without reflection and the isTagged method is not static. Maybe you can modify this a little bit in your next build ;)

Techcable commented 7 years ago

You have to aquire an existing instance of the object, via the plugin object:

CombatTagPlus plugin = (CombatTagPlus) Bukkit.getPluginManager().getPlugin("CombatTagPlus");
TagManager tagManager = plugin.getTagManager();