Please be aware that this code isn't the most efficient or reliable, I personally hate it and I will be recoding the project soon.
Send a dismissible notice to specific players on your server/proxy.
- Bukkit - https://www.spigotmc.org/resources/dismissible-notices.31290/
- BungeeCord - https://www.spigotmc.org/resources/dismissible-notices.32197/
I'm sorry for the lack of documentation, it's simply code to follow for the API side of things so you should be able to follow along. But I will gradually add documentation to it at some point.
When retrieving the API instance, simply do
NoticeAPI api = Notices.getAPI();
We don't use the Bukkit/BungeeCord event system. We wanted a system that would work in both plugins, so I made my own. Extend our EventListener class in your listener class and you'll be able to override our event methods.
public class Listener extends EventListener
{
// Override event methods in here.
}
That's the basic stuff. Now onto the NoticeAPI class itself.
api.getCreation(uuid);
api.removeCreation(uuid);
api.addCreation(uuid, notice);
api.getPlayer(uuid);
api.cachePlayer(uuid, toSave);
api.removePlayer(uuid);
api.updatePlayer(miniNotice);
api.getNotices()
api.getNotices(uuid);
api.getNoticed(uuid, noticePlayer);
api.getNotice(id);
api.addNotice(notice);
api.removeNotice(notice);
api.saveNotice(notice);
api.deleteNotice(notice);
api.updateNotice(notice);
api.clearNotices();
api.forceClearNotices();
api.loadNotices();
api.addEventListener(eventListenerInstance);
api.removeEventListener(eventListenerInstance);