Skip to content
Send a dismissible notice to specific players on your server/proxy.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bukkit-example
bukkit
bungee
common
.gitattributes
.gitignore
README.md

README.md

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.

Notices

Send a dismissible notice to specific players on your server/proxy.

Downloads

Documentation

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.

Get the Notice a player is creating.

    api.getCreation(uuid);

Discard a player's creation Notice.

    api.removeCreation(uuid);

Insert a player's Notice creation. (This will start the creation process).

    api.addCreation(uuid, notice);

Get a player's data.

    api.getPlayer(uuid);

Cache a player's data (automatically managed for you).

    api.cachePlayer(uuid, toSave);

Remove a player's data from the cache

    api.removePlayer(uuid);

Update a MiniNotice (assigned to a player via their UUID).

    api.updatePlayer(miniNotice);

Get all cached Notices.

   api.getNotices()

Get notices associated via a player's UUID.

    api.getNotices(uuid);

Get notices associated via a player's NoticePlayer data

    api.getNoticed(uuid, noticePlayer);

Get a notice from the cache via its ID. - Throws NoSuchElementException if no cache found.

    api.getNotice(id);

Add a notice to the cache.

    api.addNotice(notice);

Remove a notice from the cache.

    api.removeNotice(notice);

Save a notice's data.

    api.saveNotice(notice);

Delete a notice's data. (From the database)

    api.deleteNotice(notice);

Update notice (Get data from the database)

    api.updateNotice(notice);

Clear notices cache

    api.clearNotices();

Clear notices without calling events

    api.forceClearNotices();

Load notices from the database (automatically done every 30 seconds Asynchronously).

    api.loadNotices();

Add event listener

    api.addEventListener(eventListenerInstance);

Remove event listener

    api.removeEventListener(eventListenerInstance);
You can’t perform that action at this time.