From ea500bfa416bbd853b2af406997458e1ead30938 Mon Sep 17 00:00:00 2001
From: Marcel <8513034+MrEAlderson@users.noreply.github.com>
Date: Sun, 30 Jun 2024 14:14:44 +0200
Subject: [PATCH 1/2] Fixed not building with JDK21 due to outdated Lombok
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 454b700..8b15e83 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
org.projectlombok
lombok
- 1.18.26
+ 1.18.32
compile
From f0eba8365b32677106c418ca1a2f83d818f2fb49 Mon Sep 17 00:00:00 2001
From: Marcel <8513034+MrEAlderson@users.noreply.github.com>
Date: Sun, 30 Jun 2024 14:15:45 +0200
Subject: [PATCH 2/2] Removed "custom-team-colors" configs as they're a part of
MBedwars
---
.../config/ConfigLegacyMigrator.java | 26 -------------------
.../tweaksaddon/config/ConfigLoader.java | 13 ----------
.../tweaksaddon/config/MainConfig.java | 13 ----------
3 files changed, 52 deletions(-)
diff --git a/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLegacyMigrator.java b/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLegacyMigrator.java
index 5ccca21..ab2d082 100644
--- a/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLegacyMigrator.java
+++ b/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLegacyMigrator.java
@@ -1,6 +1,5 @@
package me.metallicgoat.tweaksaddon.config;
-import de.marcely.bedwars.api.arena.Team;
import de.marcely.bedwars.api.game.spawner.DropType;
import de.marcely.bedwars.tools.Helper;
import de.marcely.bedwars.tools.VarParticle;
@@ -9,7 +8,6 @@
import java.util.List;
import me.metallicgoat.tweaksaddon.utils.Console;
import me.metallicgoat.tweaksaddon.utils.Util;
-import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
@@ -247,30 +245,6 @@ public static void loadOldMain(FileConfiguration config) {
}
}
- MainConfig.custom_team_colors_enabled = config.getBoolean("Custom-Team-Chat-Color.Enabled", false);
- {
- if (config.contains("Custom-Team-Chat-Color.Teams")) {
-
- final HashMap map = new HashMap<>();
-
- for (String string : config.getStringList("Custom-Team-Chat-Color.Teams")) {
-
- if (!string.contains(":"))
- continue;
-
- final String[] strings = string.split(":");
- final Team team = Team.getByName(strings[0]);
- final ChatColor chatColor = ChatColor.getByChar(strings[1].charAt(0));
-
- if (team != null && chatColor != null) {
- map.put(team, chatColor);
- }
- }
-
- MainConfig.custom_team_colors = map;
- }
- }
-
MainConfig.permanent_effects_enabled = config.getBoolean("Permanent-Effects.Enabled", false);
loadPermanentEffects(config, "Permanent-Effects.Effects");
diff --git a/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLoader.java b/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLoader.java
index d54cba1..fb9e3a6 100644
--- a/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLoader.java
+++ b/src/main/java/me/metallicgoat/tweaksaddon/config/ConfigLoader.java
@@ -1,6 +1,5 @@
package me.metallicgoat.tweaksaddon.config;
-import de.marcely.bedwars.api.arena.Team;
import de.marcely.bedwars.api.configuration.ConfigurationAPI;
import de.marcely.bedwars.api.event.ConfigsLoadEvent;
import de.marcely.bedwars.tools.Helper;
@@ -10,7 +9,6 @@
import me.metallicgoat.tweaksaddon.gentiers.TierAction;
import me.metallicgoat.tweaksaddon.utils.Console;
import me.metallicgoat.tweaksaddon.utils.Util;
-import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@@ -18,7 +16,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
-import java.util.Map.Entry;
public class ConfigLoader implements Listener {
@@ -58,8 +55,6 @@ public static void loadTweaksConfigs(MBedwarsTweaksPlugin plugin) {
ConfigManager.load(plugin, SwordsToolsConfig.class, FileType.SWORDS_TOOLS);
GenTiersConfig.load(); // We load gen tiers a special way
- applyCustomTeamColors();
-
overrideMBedwarsConfigs();
final long end = System.currentTimeMillis();
@@ -107,14 +102,6 @@ public static HashMap getDefaultGenTiers() {
}};
}
- private static void applyCustomTeamColors() {
- if (!MainConfig.custom_team_colors_enabled)
- return;
-
- for (Entry entry : MainConfig.custom_team_colors.entrySet())
- entry.getKey().setBungeeChatColor(entry.getValue());
- }
-
private static void overrideMBedwarsConfigs() {
// Configure MBedwars to work like our old feature did
if (MainConfig.personal_ender_chests_enabled) {
diff --git a/src/main/java/me/metallicgoat/tweaksaddon/config/MainConfig.java b/src/main/java/me/metallicgoat/tweaksaddon/config/MainConfig.java
index cfa665f..33499b1 100644
--- a/src/main/java/me/metallicgoat/tweaksaddon/config/MainConfig.java
+++ b/src/main/java/me/metallicgoat/tweaksaddon/config/MainConfig.java
@@ -1,6 +1,5 @@
package me.metallicgoat.tweaksaddon.config;
-import de.marcely.bedwars.api.arena.Team;
import de.marcely.bedwars.api.game.spawner.DropType;
import de.marcely.bedwars.tools.Helper;
import de.marcely.bedwars.tools.NMSHelper;
@@ -13,7 +12,6 @@
import lombok.Getter;
import me.metallicgoat.tweaksaddon.config.ConfigManager.Config;
import me.metallicgoat.tweaksaddon.config.ConfigManager.SectionTitle;
-import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.potion.PotionEffect;
@@ -358,17 +356,6 @@ public class MainConfig {
public static boolean block_stat_change_enabled = false;
@Config public static List block_stat_change_arenas = new ArrayList<>();
- @Config(
- description = {
- "Change default team chat colors",
- "Add teams like: \"DefaultTeamName: ChatColorName\"",
- }
- )
- public static boolean custom_team_colors_enabled = false;
- @Config public static HashMap custom_team_colors = new HashMap() {{
- put(Team.CYAN, ChatColor.DARK_AQUA);
- }};
-
@Config(
description = {
"Permanent effects players have while playing",