-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add biome-color deprecation notice message, pretty-up update-availabl…
…e notification (#80)
- Loading branch information
Showing
5 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/dev/rndmorris/salisarcana/notifications/StartupNotifications.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package dev.rndmorris.salisarcana.notifications; | ||
|
||
import net.minecraft.util.ChatComponentTranslation; | ||
|
||
import cpw.mods.fml.common.eventhandler.SubscribeEvent; | ||
import cpw.mods.fml.common.gameevent.PlayerEvent; | ||
import dev.rndmorris.salisarcana.config.ConfigModuleRoot; | ||
|
||
public class StartupNotifications { | ||
|
||
private boolean noticeSent = false; | ||
|
||
@SubscribeEvent | ||
public void onLogin(PlayerEvent.PlayerLoggedInEvent event) { | ||
final var biomeColors = ConfigModuleRoot.biomeColors; | ||
if (noticeSent || !biomeColors.isEnabled() || biomeColors.acknowledgeDeprecation.isEnabled()) { | ||
return; | ||
} | ||
noticeSent = true; | ||
event.player.addChatMessage(new ChatComponentTranslation("salisarcana:biome_color_deprecation")); | ||
event.player.addChatMessage(new ChatComponentTranslation("salisarcana:biome_color_deprecation_suppress")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters