-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
873 additions
and
764 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
Binary file not shown.
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
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
54 changes: 54 additions & 0 deletions
54
src/main/java/net/asodev/islandutils/discord/FishingPresenceUpdator.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,54 @@ | ||
package net.asodev.islandutils.discord; | ||
|
||
import net.asodev.islandutils.IslandUtilsEvents; | ||
import net.asodev.islandutils.state.Game; | ||
import net.asodev.islandutils.state.MccIslandState; | ||
|
||
import java.time.Instant; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static net.asodev.islandutils.discord.DiscordPresenceUpdator.activity; | ||
|
||
public class FishingPresenceUpdator { | ||
public static List<String> temperatures = List.of("temperate", "tropical", "barren"); | ||
public static Map<String, String> islandNames = new HashMap<>(); | ||
|
||
static { | ||
islandNames.put("temperate_1", "Verdant Woods"); | ||
islandNames.put("temperate_2", "Floral Forest"); | ||
islandNames.put("temperate_3", "Dark Grove"); | ||
islandNames.put("temperate_grotto", "Sunken Swamp"); | ||
|
||
islandNames.put("tropical_1", "Tropical Overgrowth"); | ||
islandNames.put("tropical_2", "Coral Shores"); | ||
islandNames.put("tropical_3", "Twisted Swamp"); | ||
islandNames.put("tropical_grotto", "Mirrored Oasis"); | ||
|
||
islandNames.put("barren_1", "Ancient Sands"); | ||
islandNames.put("barren_2", "Blazing Canyon"); | ||
islandNames.put("barren_3", "Ashen Wastes"); | ||
islandNames.put("barren_grotto", "Volcanic Springs"); | ||
} | ||
|
||
public static void init() { | ||
} | ||
|
||
public static void updateFishingPlace() { | ||
if (activity == null) return; | ||
|
||
String place = islandNames.get(MccIslandState.getSubType()); | ||
if (place != null) { | ||
activity.setDetails("In the " + place); | ||
activity.assets().setLargeImage(MccIslandState.getSubType().toLowerCase()); | ||
activity.assets().setLargeText(place); | ||
|
||
activity.assets().setSmallImage("fishing"); | ||
activity.assets().setSmallText("Fishing"); | ||
} else { | ||
activity.assets().setLargeImage("fishing"); | ||
activity.assets().setLargeText("Fishing"); | ||
} | ||
} | ||
} |
Oops, something went wrong.