Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 69f355e

Browse files
author
AMinecraftDev
committed
Implemented TypeTrueFalse, a replica TypeEnabledDisabled
1 parent 053c601 commit 69f355e

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/org/stellardev/galacticlib/entity/Conf.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public class Conf extends Entity<Conf> {
1717
public String msgInvalidBoolean = "&e&lGalacticLib &8» &cThe boolean you have entered is invalid. Please use either &ftrue&c or &ffalse&c.";
1818
public String msgEnabledDisplay = "&aenabled";
1919
public String msgDisabledDisplay = "&cdisabled";
20+
public String msgTrueDisplay = "&atrue";
21+
public String msgFalseDisplay = "&cfalse";
2022

2123
public String msgInvalidTime = "&e&lGalacticLib &8» &cThe time format you have provided is invalid. Please use &f1&c, &f1s&c, &f1m&c or &f1h&c.";
2224
public String msgInvalidMaterial = "&e&lGalacticLib &8» &cThe inputted material is invalid. Please try something like &fDirt&c, &f3&c, &f3:0&c, or &fDirt:0&c.";
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.stellardev.galacticlib.type;
2+
3+
import com.massivecraft.massivecore.util.Txt;
4+
import org.stellardev.galacticlib.entity.Conf;
5+
6+
public class TypeTrueFalse {
7+
8+
public static String get(boolean bool) {
9+
return Txt.parse(bool? Conf.get().msgTrueDisplay : Conf.get().msgFalseDisplay);
10+
}
11+
}

0 commit comments

Comments
 (0)