use of io.github.nucleuspowered.nucleus.modules.note.handlers.NoteHandler in project Nucleus by NucleusPowered.
the class NoteModule method performEnableTasks.
@Override
public void performEnableTasks() {
// Take base permission from /checknotes.
createSeenModule(CheckNotesCommand.class, (c, u) -> {
NoteHandler jh = plugin.getInternalServiceManager().getServiceUnchecked(NoteHandler.class);
int active = jh.getNotesInternal(u).size();
Text r = plugin.getMessageProvider().getTextMessageWithFormat("seen.notes", String.valueOf(active));
if (active > 0) {
return Lists.newArrayList(r.toBuilder().onClick(TextActions.runCommand("/checknotes " + u.getName())).onHover(TextActions.showText(plugin.getMessageProvider().getTextMessageWithFormat("standard.clicktoseemore"))).build());
}
return Lists.newArrayList(r);
});
}
Aggregations