Skip to content

Commit

Permalink
QOL additions
Browse files Browse the repository at this point in the history
  • Loading branch information
MetallicGoat committed May 19, 2024
1 parent 01b6c25 commit 874fbf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public class ConfigLoader implements Listener {

@EventHandler
public void onConfigLoad(ConfigsLoadEvent event) {
if (!event.isStartup())
if (!event.isStartup()) {
MBedwarsTweaksPlugin.getInstance().loadTweaks(); // Reload tweaks

}
}

public static void loadTweaksConfigs(MBedwarsTweaksPlugin plugin) {
Expand Down Expand Up @@ -116,7 +116,7 @@ private static void applyCustomTeamColors() {
}

private static void overrideMBedwarsConfigs() {
// APPLY OUR OVERRIDES
// Configure MBedwars to work like our old feature did
if (MainConfig.personal_ender_chests_enabled) {
try {
final boolean teamchestEnabled = (boolean) ConfigurationAPI.get().getValue("teamchest-enabled");
Expand All @@ -125,15 +125,14 @@ private static void overrideMBedwarsConfigs() {
if (teamchestEnabled && teamchestBlock == Helper.get().getMaterialByName("ENDER_CHEST")) {
ConfigurationAPI.get().setValue("teamchest-enabled", false);
Console.printWarn(
"WARNING: You have \"personal-ender-chests-enabled\" enabled. This setting will be removed in the future, as it is already possible in MBedwars." ,
"WARNING: You have \"personal-ender-chests-enabled\" enabled. This setting will be removed in the future, as it is already possible in MBedwars.",
"Open your MBedwars config.yml, and either set \"teamchest-enabled\" to false, or set \"teamchest-block\" to CHEST.",
"Currently, we are using the MBedwars configuration api to override these values for you."
"Currently, we are using the MBedwars configuration api to override these values for you, but we may not do this in the future."
);
}

} catch (Exception e) {
} catch (IllegalArgumentException e) {
Console.printWarn("Failed to apply personal ender chests. Try updating MBedwars, or disabling \"personal-ender-chests-enabled\"");
e.printStackTrace();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,14 @@ public class MainConfig {

@Config(
description = {
"Removes invisibility on specified damage causes"
"Removes invisibility on specified DamageCause. See the full list of DamageCauses here:",
"https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html"
}
)
public static boolean remove_invis_ondamage_enabled = true;
@Config public static List<EntityDamageEvent.DamageCause> remove_invis_damge_causes = new ArrayList<>(Arrays.asList(
EntityDamageEvent.DamageCause.ENTITY_ATTACK,
EntityDamageEvent.DamageCause.PROJECTILE,
EntityDamageEvent.DamageCause.BLOCK_EXPLOSION,
EntityDamageEvent.DamageCause.ENTITY_EXPLOSION
));
Expand Down

0 comments on commit 874fbf8

Please sign in to comment.