make update message stay for 30s
All checks were successful
/ Build BaseBand (push) Successful in 3m9s
All checks were successful
/ Build BaseBand (push) Successful in 3m9s
This commit is contained in:
parent
e72db8f9ff
commit
091c8c2ca6
2 changed files with 11 additions and 3 deletions
|
@ -110,9 +110,13 @@ public class BaseBand {
|
|||
}
|
||||
|
||||
public static void notify(String text) {
|
||||
notify(text, 10000);
|
||||
}
|
||||
|
||||
public static void notify(String text, int time) {
|
||||
Client c = Features.getFeature(Client.class);
|
||||
if(Features.isFeatureEnabled(HUD.class) && c.notificationDest != Client.NotificationDest.Chat) {
|
||||
HUD.notifs.add(new NotificationRender.Notification(text));
|
||||
HUD.notifs.add(new NotificationRender.Notification(text, time));
|
||||
if(c.notificationDest == Client.NotificationDest.Both)
|
||||
Chat.print(text);
|
||||
else
|
||||
|
@ -122,8 +126,12 @@ public class BaseBand {
|
|||
}
|
||||
|
||||
public static void notifyAll(String text) {
|
||||
notifyAll(text, 10000);
|
||||
}
|
||||
|
||||
public static void notifyAll(String text, int time) {
|
||||
if(Features.isFeatureEnabled(HUD.class)) {
|
||||
HUD.notifs.add(new NotificationRender.Notification(text));
|
||||
HUD.notifs.add(new NotificationRender.Notification(text, time));
|
||||
}
|
||||
Chat.print(text);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class WebServiceClient {
|
|||
BaseBand.LOGGER.info("Connected to BaseBand server");
|
||||
if(!packet.getString("commit").equals(GitHash.GIT_HASH) && !outdated) {
|
||||
outdated = true;
|
||||
BaseBand.notify("§d§lBaseBand has updated. To update, restart Minecraft.");
|
||||
BaseBand.notifyAll("§d§lBaseBand has updated. To update, restart Minecraft.", 30000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue