Skip to content

Commit 5186ad5

Browse files
committed
Version 1.0-alpha.5
1 parent 72847bf commit 5186ad5

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

.idea/sonarlint/issuestore/index.pb

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sonarlint/securityhotspotstore/index.pb

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/src/main/java/fr/euphyllia/skyllia/configuration/ConfigToml.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class ConfigToml {
3636
public static Map<String, SchematicWorld> schematicWorldMap = new HashMap<>();
3737
public static String defaultSchematicKey = "example-schem";
3838
public static int updateCacheTimer = 60;
39+
public static int dbVersion = 1;
3940
private static boolean verbose;
4041

4142
public static void init(File configFile) {
@@ -45,7 +46,9 @@ public static void init(File configFile) {
4546

4647
version = getInt("config-version", 1);
4748
set("config-version", 1);
48-
logger.log(Level.FATAL, "Lecture des config");
49+
if (verbose) {
50+
logger.log(Level.INFO, "Lecture des config");
51+
}
4952
try {
5053
readConfig(ConfigToml.class, null);
5154
} catch (Exception e) {
@@ -99,7 +102,7 @@ private static Double getDouble(@NotNull String path, Double def) {
99102
}
100103
if (tryIt instanceof Double) { // Fix issue https://github.com/Euphillya/skyllia/issues/9
101104
return config.get(path);
102-
} else if (tryIt instanceof Integer){
105+
} else if (tryIt instanceof Integer) {
103106
return (double) config.getInt(path);
104107
} else {
105108
String value = String.valueOf(config.get(path));
@@ -153,8 +156,6 @@ private static Long getLong(@NotNull String path, Long def) {
153156
return builder.build();
154157
}
155158

156-
public static int dbVersion = 1;
157-
158159
private static void initMariaDB() {
159160
String path = "sgbd.mariadb.%s";
160161
String hostname = getString(path.formatted("hostname"), "127.0.0.1");

plugin/src/main/java/fr/euphyllia/skyllia/configuration/LanguageToml.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ public static void init(File configFile) {
101101

102102
version = getInt("config-version", 1);
103103
set("config-version", 1);
104-
logger.log(Level.FATAL, "Lecture des config");
104+
if (verbose) {
105+
logger.log(Level.INFO, "Lecture du fichier langue");
106+
}
105107
try {
106108
readConfig(LanguageToml.class, null);
107109
} catch (Exception e) {

plugin/src/main/java/fr/euphyllia/skyllia/utils/PlayerUtils.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public static void teleportPlayerSpawn(Main main, Player player) {
3434
public static void updateChunk(Main main, Player player, int chunkX, int chunkZ) throws UnsupportedMinecraftVersionException {
3535
final String versionMC = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
3636
switch (versionMC) {
37-
case "v1_19_R3" ->
38-
PlayerNMS.refreshPlayerChunk(main, player, chunkX, chunkZ);
37+
case "v1_19_R3" -> PlayerNMS.refreshPlayerChunk(main, player, chunkX, chunkZ);
3938
case "v1_20_R1" ->
4039
fr.euphyllia.skyllia.utils.nms.v1_20_R1.PlayerNMS.refreshPlayerChunk(main, player, chunkX, chunkZ);
4140
case "v1_20_R2" ->

plugin/src/main/java/fr/euphyllia/skyllia/utils/RegionUtils.java

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public static Vector getMaxXRegion(World world, int regionX, int regionZ) {
114114
public static Position getRegionWithLocation(int locX, int locZ) {
115115
return getRegionInChunk(locX >> 4, locZ >> 4);
116116
}
117+
117118
public static Position getRegionInChunk(Position chunk) {
118119
return getRegionInChunk(chunk.regionX(), chunk.regionZ());
119120
}

0 commit comments

Comments
 (0)