summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2021-12-30 12:17:32 -0500
committerGitHub <noreply@github.com>2021-12-30 12:17:32 -0500
commit31d60d7d23715aa3f063241c0c420ea0b0bf003b (patch)
treeca43ffa540d9629f6f0faf2ab3d5e5941db0f352 /src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java
parentMerge pull request #16 from tylermurphy534/1.3.2 (diff)
parent1.3.3 rc5 (diff)
downloadkenshinshideandseek-31d60d7d23715aa3f063241c0c420ea0b0bf003b.tar.gz
kenshinshideandseek-31d60d7d23715aa3f063241c0c420ea0b0bf003b.tar.bz2
kenshinshideandseek-31d60d7d23715aa3f063241c0c420ea0b0bf003b.zip
Merge pull request #20 from tylermurphy534/1.3.3
1.3.3
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java94
1 files changed, 51 insertions, 43 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java b/src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java
index fd0e020..3d8bc0f 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/configuration/LocalizationString.java
@@ -1,48 +1,56 @@
+/*
+ * This file is part of Kenshins Hide and Seek
+ *
+ * Copyright (c) 2021 Tyler Murphy.
+ *
+ * Kenshins Hide and Seek free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * he Free Software Foundation version 3.
+ *
+ * Kenshins Hide and Seek is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
package net.tylermurphy.hideAndSeek.configuration;
-import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
public class LocalizationString {
-
- String message;
-
- public LocalizationString(String message) {
- this.message = message;
- }
-
- public LocalizationString addPlayer(Entity player) {
- this.message = message.replaceFirst("\\{PLAYER\\}", player.getName());
- return this;
- }
-
- public LocalizationString addPlayer(CommandSender player) {
- this.message = message.replaceFirst("\\{PLAYER\\}", player.getName());
- return this;
- }
-
- public LocalizationString addPlayer(String player) {
- this.message = message.replaceFirst("\\{PLAYER\\}", player);
- return this;
- }
-
- public LocalizationString addAmount(Integer value) {
- this.message = message.replaceFirst("\\{AMOUNT\\}", value.toString());
- return this;
- }
-
- public LocalizationString addAmount(String value) {
- this.message = message.replaceFirst("\\{AMOUNT\\}", value.toString());
- return this;
- }
-
- public LocalizationString addAmount(Float value) {
- this.message = message.replaceFirst("\\{AMOUNT\\}", value.toString());
- return this;
- }
-
- public String toString() {
- return message;
- }
-
-}
+
+ String message;
+
+ public LocalizationString(String message) {
+ this.message = message;
+ }
+
+ public LocalizationString addPlayer(Entity player) {
+ this.message = message.replaceFirst("\\{PLAYER}", player.getName());
+ return this;
+ }
+
+ public LocalizationString addPlayer(String player) {
+ this.message = message.replaceFirst("\\{PLAYER}", player);
+ return this;
+ }
+
+ public LocalizationString addAmount(Integer value) {
+ this.message = message.replaceFirst("\\{AMOUNT}", value.toString());
+ return this;
+ }
+
+ public LocalizationString addAmount(String value) {
+ this.message = message.replaceFirst("\\{AMOUNT}", value);
+ return this;
+ }
+
+ public String toString() {
+ return message;
+ }
+
+} \ No newline at end of file