Made Notifier.Notification private

External plugins/addons shouldn't have had access to this inner class.
This commit is contained in:
Florian CUNY 2018-09-01 14:30:25 +02:00
parent 678e699f1d
commit 8e7843de82

View File

@ -40,7 +40,8 @@ public class Notifier {
try {
Notification lastNotification = notificationCache.get(user);
long now = System.currentTimeMillis();
if (now >= lastNotification.getTime() + NOTIFICATION_DELAY * 1000 || !message.equals(lastNotification.getMessage())) {
if (now >= lastNotification.getTime() + (NOTIFICATION_DELAY * 1000) || !message.equals(lastNotification.getMessage())) {
notificationCache.put(user, new Notification(message, now));
user.sendRawMessage(message);
return true;
@ -51,11 +52,11 @@ public class Notifier {
}
}
public class Notification {
private class Notification {
private final String message;
private final long time;
public Notification(String message, long time) {
private Notification(String message, long time) {
this.message = message;
this.time = time;
}