Update development #5

Merge aplicado
Awakened-Redstone mesclou 27 commits from temp into development 2022-02-18 19:01:36 +00:00
5 arquivos alterados com 14 adições e 13 exclusões
Mostrando apenas as alterações do commit d7c002cc60 - Mostrar todos os commits

Beta 5 - >=22w03a

Awakened-Redstone 2022-01-26 12:26:04 -03:00

Ver arquivo

@ -1,9 +1,9 @@
org.gradle.jvmargs=-Xmx1G org.gradle.jvmargs=-Xmx1G
minecraft_version=1.17.1 minecraft_version=22w03a
yarn_mappings=1.17.1+build.65 yarn_mappings=22w03a+build.8
loader_version=0.11.6 loader_version=0.12.12
mod_version=beta-4 mod_version=beta-5
maven_group=com.awakenedredstone maven_group=com.awakenedredstone
archives_base_name=autowhitelist archives_base_name=autowhitelist
fabric_version=0.44.0+1.17 fabric_version=0.46.2+1.18

Ver arquivo

@ -13,6 +13,7 @@ import com.awakenedredstone.autowhitelist.whitelist.ExtendedWhitelistEntry;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfile;
import com.mojang.logging.LogUtils;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.minecraft.scoreboard.Scoreboard; import net.minecraft.scoreboard.Scoreboard;
import net.minecraft.scoreboard.Team; import net.minecraft.scoreboard.Team;
@ -20,7 +21,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.server.PlayerManager; import net.minecraft.server.PlayerManager;
import net.minecraft.server.WhitelistEntry; import net.minecraft.server.WhitelistEntry;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.slf4j.Logger;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -34,11 +35,11 @@ import java.util.stream.Collectors;
import static com.awakenedredstone.autowhitelist.lang.JigsawLanguage.translations; import static com.awakenedredstone.autowhitelist.lang.JigsawLanguage.translations;
public class AutoWhitelist implements ModInitializer { public class AutoWhitelist implements ModInitializer {
public static MinecraftServer server; public static MinecraftServer server;
public static final Config config = new Config(); public static final Config config = new Config();
public static final Logger LOGGER = LogManager.getLogger("AutoWhitelist"); public static final Logger LOGGER = LogUtils.getLogger();
public static final org.apache.logging.log4j.Logger LOG4J_LOGGER = LogManager.getLogger("AutoWhitelist");
public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); public static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
private static final File configFile = new File(config.getConfigDirectory(), "AutoWhitelist.json"); private static final File configFile = new File(config.getConfigDirectory(), "AutoWhitelist.json");

Ver arquivo

@ -29,7 +29,7 @@ public class Config {
String json = reader.lines().collect(Collectors.joining("\n")); String json = reader.lines().collect(Collectors.joining("\n"));
StringReader stringReader = new StringReader(json); StringReader stringReader = new StringReader(json);
JsonObject jsonObject = new JsonParser().parse(json).getAsJsonObject(); JsonObject jsonObject = JsonParser.parseString(json).getAsJsonObject();
if (jsonObject.get("version") == null || jsonObject.get("version").getAsFloat() != configVersion) { if (jsonObject.get("version") == null || jsonObject.get("version").getAsFloat() != configVersion) {
jsonObject.add("owners", new JsonArray()); jsonObject.add("owners", new JsonArray());
@ -58,7 +58,7 @@ public class Config {
} catch (NullPointerException ignored) {} } catch (NullPointerException ignored) {}
} }
} catch (IOException e) { } catch (IOException e) {
AutoWhitelist.LOGGER.error(e); AutoWhitelist.LOG4J_LOGGER.error(e);
} }
} }
} }

Ver arquivo

@ -88,7 +88,7 @@ public class Bot implements Runnable {
} catch (LoginException e) { } catch (LoginException e) {
AutoWhitelist.LOGGER.error("Failed to start bot, please verify the token."); AutoWhitelist.LOGGER.error("Failed to start bot, please verify the token.");
} catch (Exception e) { } catch (Exception e) {
AutoWhitelist.LOGGER.error(e); AutoWhitelist.LOG4J_LOGGER.error(e);
} }
} }
} }

Ver arquivo

@ -23,7 +23,7 @@
"autowhitelist.mixins.json" "autowhitelist.mixins.json"
], ],
"depends": { "depends": {
"fabricloader": ">=0.11.2", "fabricloader": ">=0.12.12",
"minecraft": ">=1.17.1" "minecraft": ">=22w03a"
} }
} }