mirror of
https://github.com/YouHaveTrouble/BlockEdit.git
synced 2026-06-29 13:36:19 +00:00
cleanup
This commit is contained in:
@@ -90,6 +90,7 @@
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.10.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -17,7 +17,6 @@ public class BELocale {
|
||||
|
||||
|
||||
protected BELocale(JsonObject json) {
|
||||
BlockEdit.getPlugin().getSLF4JLogger().info(json.toString());
|
||||
couldNotFindWandById = json.get("could_not_find_wand_by_id").getAsString();
|
||||
selectArea = json.get("select_area").getAsString();
|
||||
copiedSelectionToClipboard = json.get("copied_selection_to_clipboard").getAsString();
|
||||
|
||||
@@ -50,7 +50,6 @@ public class BEPlayer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void resetSelection() {
|
||||
|
||||
@@ -9,10 +9,8 @@ import org.reflections.Reflections;
|
||||
import org.reflections.scanners.Scanners;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class BlockEdit extends JavaPlugin {
|
||||
|
||||
@@ -65,7 +63,11 @@ public final class BlockEdit extends JavaPlugin {
|
||||
String localeString = fileName
|
||||
.replace(".json", "")
|
||||
.replace("locale/", "");
|
||||
locale = Locale.of(localeString);
|
||||
String[] localeStringSplit = localeString.split("_");
|
||||
if (localeStringSplit.length != 2) {
|
||||
throw new IllegalArgumentException("Invalid locale file name: " + fileName);
|
||||
}
|
||||
locale = Locale.of(localeStringSplit[0], localeStringSplit[1].toUpperCase());
|
||||
} catch (IllegalArgumentException e) {
|
||||
plugin.getSLF4JLogger().error("Invalid locale file name: {}", fileName);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user