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