Prevented lang autoupdate when no changes are made

This commit is contained in:
BuildTools 2020-10-14 15:10:30 +01:00
parent 21e3c22462
commit 5ec5d510df
2 changed files with 4 additions and 3 deletions

View File

@ -43,6 +43,9 @@ public abstract class UpdatingLang {
YamlConfiguration newConfig = new YamlConfiguration();
newConfig.load(reader);
if(newConfig.getKeys(true).equals(config.getKeys(true)))
return;
newConfig.getKeys(true).forEach((s -> {
if (!config.getKeys(true).contains(s)) {
config.set(s, newConfig.get(s));

View File

@ -18,7 +18,6 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.EnchantmentStorageMeta;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.jetbrains.annotations.ApiStatus;
import java.util.ArrayList;
import java.util.Arrays;
@ -41,13 +40,12 @@ public final class EnchantDisplay {
/**
* The meta key to hide enchantments in lore
*
* Only used for parity in setcreativeslot.
* Only used for parity in {@link com.willfp.ecoenchants.display.packets.PacketSetCreativeSlot}.
* More robust method to be introduced
*
* @deprecated Temporary fix
*/
@Deprecated
@ApiStatus.ScheduledForRemoval
public static final NamespacedKey KEY_SKIP = new NamespacedKey(EcoEnchantsPlugin.getInstance(), "ecoenchantlore-skip");
/**