mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
invalid symbols?
This commit is contained in:
parent
77ee6d2b81
commit
7e208afbe2
@ -38,7 +38,7 @@ public class Flag {
|
|||||||
* @throws IllegalArgumentException if you provide inadequate inputs
|
* @throws IllegalArgumentException if you provide inadequate inputs
|
||||||
*/
|
*/
|
||||||
public Flag(final AbstractFlag key, final String value) {
|
public Flag(final AbstractFlag key, final String value) {
|
||||||
final char[] allowedCharacters = new char[]{'[', ']', '(', ')', ',', '_', '-', '.', ',', '?', '!', '&', '<EFBFBD>'};
|
final char[] allowedCharacters = new char[]{'[', ']', '(', ')', ',', '_', '-', '.', ',', '?', '!', '&', ':', '§'};
|
||||||
String tempValue = value;
|
String tempValue = value;
|
||||||
for (final char c : allowedCharacters) {
|
for (final char c : allowedCharacters) {
|
||||||
tempValue = tempValue.replace(c, 'c');
|
tempValue = tempValue.replace(c, 'c');
|
||||||
|
@ -179,16 +179,7 @@ public class WorldGenerator extends PlotGenerator {
|
|||||||
super(world);
|
super(world);
|
||||||
|
|
||||||
if (this.plotworld == null) {
|
if (this.plotworld == null) {
|
||||||
this.plotworld = new DefaultPlotWorld(world);
|
this.plotworld = (DefaultPlotWorld) PlotMain.getWorldSettings(world);
|
||||||
if (!PlotMain.config.contains("worlds." + world)) {
|
|
||||||
PlotMain.config = YamlConfiguration.loadConfiguration(PlotMain.configFile);
|
|
||||||
PlotMain.config.createSection("worlds." + world);
|
|
||||||
}
|
|
||||||
final ConfigurationSection section = PlotMain.config.getConfigurationSection("worlds." + world);
|
|
||||||
this.plotworld.saveConfiguration(section);
|
|
||||||
this.plotworld.loadDefaultConfiguration(section);
|
|
||||||
this.plotworld.loadConfiguration(section);
|
|
||||||
PlotMain.sendConsoleSenderMessage("&cFailed to load the plotworld settings from the configuration. Attempting to reload it");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.plotsize = this.plotworld.PLOT_WIDTH;
|
this.plotsize = this.plotworld.PLOT_WIDTH;
|
||||||
|
@ -21,7 +21,7 @@ public class TranslationObject {
|
|||||||
creationDescription = "";
|
creationDescription = "";
|
||||||
}
|
}
|
||||||
for (char c : key.toCharArray()) {
|
for (char c : key.toCharArray()) {
|
||||||
if (!Character.isDigit(c) && !Character.isAlphabetic(c) && c != '_' && c != '&' && c != '§' && c != ':') {
|
if (!Character.isDigit(c) && !Character.isAlphabetic(c) && c != '_' && c != '&' && c != '§' && c != ':') {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
String.format("Translation: '%s' is invalid (Character: '%s') - Only alphanumeric + (\\, _, &, §, :) charcters are allowed",
|
String.format("Translation: '%s' is invalid (Character: '%s') - Only alphanumeric + (\\, _, &, §, :) charcters are allowed",
|
||||||
key, c + ""
|
key, c + ""
|
||||||
|
@ -23,7 +23,7 @@ public class BukkitTranslation {
|
|||||||
public static String convert(TranslationAsset asset) {
|
public static String convert(TranslationAsset asset) {
|
||||||
// In some cases newline can screw stuff up, so I added a new character thing
|
// In some cases newline can screw stuff up, so I added a new character thing
|
||||||
// &- = new line
|
// &- = new line
|
||||||
return asset.getTranslated().replace("&-", "\n").replace('&', '§');
|
return asset.getTranslated().replace("&-", "\n").replace('&', '§');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user