Skip to content

Commit

Permalink
Allow setting NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
x86-39 committed Dec 1, 2022
1 parent 3718e0a commit 0600f6e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/me/diademiemi/adventageous/advent/Advent.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public static String getClaimSound() {
}

public static boolean setClaimSound(String claimSound) {
if (claimSound.stripLeading().stripTrailing().equalsIgnoreCase("NONE")) {
Advent.claimSound = "NONE";
return true;
}

claimSound = claimSound.toUpperCase().stripLeading().stripTrailing();
claimSound = claimSound.replace(".", "_");
try {
Expand All @@ -101,6 +106,10 @@ public static String getClaimParticle() {
}

public static boolean setClaimParticle(String claimParticle) {
if (claimParticle.stripLeading().stripTrailing().equalsIgnoreCase("NONE")) {
Advent.claimParticle = "NONE";
return true;
}
claimParticle = claimParticle.toUpperCase().stripLeading().stripTrailing();
try {
Particle.valueOf(claimParticle);
Expand Down

0 comments on commit 0600f6e

Please sign in to comment.