Skip to content

Commit 8e7843d

Browse files
committed
Made Notifier.Notification private
External plugins/addons shouldn't have had access to this inner class.
1 parent 678e699 commit 8e7843d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/world/bentobox/bentobox/api/user/Notifier.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public synchronized boolean notify(User user, String message) {
4040
try {
4141
Notification lastNotification = notificationCache.get(user);
4242
long now = System.currentTimeMillis();
43-
if (now >= lastNotification.getTime() + NOTIFICATION_DELAY * 1000 || !message.equals(lastNotification.getMessage())) {
43+
44+
if (now >= lastNotification.getTime() + (NOTIFICATION_DELAY * 1000) || !message.equals(lastNotification.getMessage())) {
4445
notificationCache.put(user, new Notification(message, now));
4546
user.sendRawMessage(message);
4647
return true;
@@ -51,11 +52,11 @@ public synchronized boolean notify(User user, String message) {
5152
}
5253
}
5354

54-
public class Notification {
55+
private class Notification {
5556
private final String message;
5657
private final long time;
5758

58-
public Notification(String message, long time) {
59+
private Notification(String message, long time) {
5960
this.message = message;
6061
this.time = time;
6162
}

0 commit comments

Comments
 (0)