mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 04:25:14 +01:00
Do not automatically color config strings (Fixes BUKKIT-1241)
This is necessary so that we still store the messages with the & code internally as they would get saved back to the config file using the converted color code (section sign) which could lead to encoding issues on different operating systems. (It also fixes issues with strings that contain an and sign that isn't supposed to be a color code) Instead we load the real string and color messages via the prefix method which should get called in every instance where a message is send.
This commit is contained in:
parent
519a4fca8a
commit
d332603fb4
@ -39,8 +39,6 @@ public class ValueParser {
|
||||
}
|
||||
|
||||
return map;
|
||||
} else if (object instanceof String) {
|
||||
return Configuration.getColoured((String) object);
|
||||
} else {
|
||||
return object;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.Acrobot.ChestShop.Configuration;
|
||||
|
||||
import com.Acrobot.Breeze.Configuration.Annotations.PrecededBySpace;
|
||||
import org.bukkit.ChatColor;
|
||||
import com.Acrobot.Breeze.Configuration.Configuration;
|
||||
|
||||
/**
|
||||
* @author Acrobot
|
||||
@ -73,6 +73,6 @@ public class Messages {
|
||||
public static String TOGGLE_MESSAGES_ON = "You will now receive messages from your shop(s).";
|
||||
|
||||
public static String prefix(String message) {
|
||||
return prefix + message;
|
||||
return Configuration.getColoured( prefix + message);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user