Sfoglia il codice sorgente

Config files will update automatically again

nossr50 2 anni fa
parent
commit
0ab93586fd
45 ha cambiato i file con 154 aggiunte e 196 eliminazioni
  1. 4 0
      Changelog.txt
  2. 1 1
      pom.xml
  3. 2 2
      src/main/java/com/gmail/nossr50/api/ExperienceAPI.java
  4. 4 4
      src/main/java/com/gmail/nossr50/chat/ChatManager.java
  5. 1 1
      src/main/java/com/gmail/nossr50/chat/author/AbstractPlayerAuthor.java
  6. 2 2
      src/main/java/com/gmail/nossr50/chat/author/Author.java
  7. 2 2
      src/main/java/com/gmail/nossr50/chat/mailer/AdminChatMailer.java
  8. 2 2
      src/main/java/com/gmail/nossr50/chat/mailer/PartyChatMailer.java
  9. 2 7
      src/main/java/com/gmail/nossr50/config/AdvancedConfig.java
  10. 75 110
      src/main/java/com/gmail/nossr50/config/BukkitConfig.java
  11. 1 1
      src/main/java/com/gmail/nossr50/config/ChatConfig.java
  12. 2 2
      src/main/java/com/gmail/nossr50/config/CoreSkillsConfig.java
  13. 0 6
      src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java
  14. 1 1
      src/main/java/com/gmail/nossr50/config/skills/repair/RepairConfig.java
  15. 1 1
      src/main/java/com/gmail/nossr50/config/treasure/FishingTreasureConfig.java
  16. 1 1
      src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java
  17. 3 3
      src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java
  18. 1 1
      src/main/java/com/gmail/nossr50/datatypes/skills/interfaces/Toolable.java
  19. 1 1
      src/main/java/com/gmail/nossr50/datatypes/skills/subskills/AbstractSubSkill.java
  20. 1 1
      src/main/java/com/gmail/nossr50/datatypes/skills/subskills/interfaces/SubSkill.java
  21. 2 2
      src/main/java/com/gmail/nossr50/metadata/MobMetadataService.java
  22. 1 1
      src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java
  23. 1 1
      src/main/java/com/gmail/nossr50/util/Misc.java
  24. 1 1
      src/main/java/com/gmail/nossr50/util/compat/CompatibilityLayer.java
  25. 4 1
      src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java
  26. 1 1
      src/main/java/com/gmail/nossr50/util/platform/MajorMinorPatchVersion.java
  27. 1 1
      src/main/java/com/gmail/nossr50/util/platform/MinecraftGameVersion.java
  28. 4 4
      src/main/java/com/gmail/nossr50/util/skills/RankUtils.java
  29. 3 3
      src/main/resources/chat.yml
  30. 8 11
      src/main/resources/config.yml
  31. 1 1
      src/main/resources/experience.yml
  32. 1 1
      src/main/resources/locale/locale_cs_CZ.properties
  33. 1 1
      src/main/resources/locale/locale_cy.properties
  34. 1 1
      src/main/resources/locale/locale_da.properties
  35. 5 5
      src/main/resources/locale/locale_en_US.properties
  36. 1 1
      src/main/resources/locale/locale_es.properties
  37. 1 1
      src/main/resources/locale/locale_fi.properties
  38. 1 1
      src/main/resources/locale/locale_it.properties
  39. 1 1
      src/main/resources/locale/locale_ko.properties
  40. 1 1
      src/main/resources/locale/locale_nl.properties
  41. 1 1
      src/main/resources/locale/locale_sv.properties
  42. 1 1
      src/main/resources/locale/locale_th_TH.properties
  43. 1 1
      src/main/resources/mods/armor.default.yml
  44. 2 2
      src/main/resources/mods/tools.default.yml
  45. 2 2
      src/main/resources/plugin.yml

+ 4 - 0
Changelog.txt

@@ -1,3 +1,7 @@
+Version 2.1.220
+    Config files update automatically again
+    Default configs are now copied to plugins/mcMMO/defaults for easy reference, these configs will always match the default values of the config in the JAR
+
 Version 2.1.219
     Fixed Fishing exploit protection being triggered inappropriately by other plugins (Thanks smudgge)
     Fixed wiki url being incorrect in commands

+ 1 - 1
pom.xml

@@ -2,7 +2,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.gmail.nossr50.mcMMO</groupId>
     <artifactId>mcMMO</artifactId>
-    <version>2.1.219</version>
+    <version>2.1.220-SNAPSHOT</version>
     <name>mcMMO</name>
     <url>https://github.com/mcMMO-Dev/mcMMO</url>
     <scm>

+ 2 - 2
src/main/java/com/gmail/nossr50/api/ExperienceAPI.java

@@ -41,7 +41,7 @@ public final class ExperienceAPI {
 
     /**
      * Start the task that gives combat XP.
-     * Processes combat XP like mcMMO normally would, so mcMMO will check whether or not the entity should reward XP when giving out the XP
+     * Processes combat XP like mcMMO normally would, so mcMMO will check whether the entity should reward XP when giving out the XP
      *
      * @param mcMMOPlayer The attacking player
      * @param target The defending entity
@@ -56,7 +56,7 @@ public final class ExperienceAPI {
 
     /**
      * Start the task that gives combat XP.
-     * Processes combat XP like mcMMO normally would, so mcMMO will check whether or not the entity should reward XP when giving out the XP
+     * Processes combat XP like mcMMO normally would, so mcMMO will check whether the entity should reward XP when giving out the XP
      *
      * @param mcMMOPlayer The attacking player
      * @param target The defending entity

+ 4 - 4
src/main/java/com/gmail/nossr50/chat/ChatManager.java

@@ -43,7 +43,7 @@ public class ChatManager {
      *
      * @param mmoPlayer target player
      * @param rawMessage the raw message from the player as it was typed
-     * @param isAsync whether or not this is getting processed via async
+     * @param isAsync whether this is getting processed via async
      */
     public void processPlayerMessage(@NotNull McMMOPlayer mmoPlayer, @NotNull String rawMessage, boolean isAsync) {
         processPlayerMessage(mmoPlayer, mmoPlayer.getChatChannel(), rawMessage, isAsync);
@@ -69,7 +69,7 @@ public class ChatManager {
      * @param mmoPlayer target player
      * @param chatChannel target chat channel
      * @param rawMessage raw chat message as it was typed
-     * @param isAsync whether or not this is getting processed via async
+     * @param isAsync whether this is getting processed via async
      */
     private void processPlayerMessage(@NotNull McMMOPlayer mmoPlayer, @NotNull ChatChannel chatChannel, @NotNull String rawMessage, boolean isAsync) {
         switch (chatChannel) {
@@ -155,7 +155,7 @@ public class ChatManager {
     }
 
     /**
-     * Whether or not the player is allowed to send a message to the chat channel they are targeting
+     * Whether the player is allowed to send a message to the chat channel they are targeting
      * @param mmoPlayer target player
      * @return true if the player can send messages to that chat channel
      */
@@ -197,7 +197,7 @@ public class ChatManager {
     }
 
     /**
-     * Whether or not a specific chat channel is enabled
+     * Whether a specific chat channel is enabled
      * ChatChannels are enabled/disabled via user config
      *
      * If chat is disabled, this always returns false

+ 1 - 1
src/main/java/com/gmail/nossr50/chat/author/AbstractPlayerAuthor.java

@@ -73,7 +73,7 @@ public abstract class AbstractPlayerAuthor implements Author {
      * Sanitized names are associated with a {@link ChatChannel} as different chat channels have different chat name settings
      *
      * @param chatChannel target chat channel
-     * @param useDisplayName whether or not to use this authors display name
+     * @param useDisplayName whether to use this authors display name
      */
     private void updateSanitizedNameCache(@NotNull ChatChannel chatChannel, boolean useDisplayName) {
         if(useDisplayName) {

+ 2 - 2
src/main/java/com/gmail/nossr50/chat/author/Author.java

@@ -17,14 +17,14 @@ public interface Author extends Identity {
     @NotNull String getAuthoredName(@NotNull ChatChannel chatChannel);
 
     /**
-     * Whether or not this author is a {@link org.bukkit.command.ConsoleCommandSender}
+     * Whether this author is a {@link org.bukkit.command.ConsoleCommandSender}
      *
      * @return true if this author is the console
      */
     boolean isConsole();
 
     /**
-     * Whether or not this author is a {@link org.bukkit.entity.Player}
+     * Whether this author is a {@link org.bukkit.entity.Player}
      * @return true if this author is a player
      */
     boolean isPlayer();

+ 2 - 2
src/main/java/com/gmail/nossr50/chat/mailer/AdminChatMailer.java

@@ -73,8 +73,8 @@ public class AdminChatMailer extends AbstractChatMailer {
      *
      * @param author the author
      * @param rawString the raw message as the author typed it before any styling
-     * @param isAsync whether or not this is being processed asynchronously
-     * @param canColor whether or not the author can use colors in chat
+     * @param isAsync whether this is being processed asynchronously
+     * @param canColor whether the author can use colors in chat
      */
     public void processChatMessage(@NotNull Author author, @NotNull String rawString, boolean isAsync, boolean canColor) {
         AdminChatMessage chatMessage = new AdminChatMessage(pluginRef, author, constructAudience(), rawString, addStyle(author, rawString, canColor));

+ 2 - 2
src/main/java/com/gmail/nossr50/chat/mailer/PartyChatMailer.java

@@ -27,8 +27,8 @@ public class PartyChatMailer extends AbstractChatMailer {
      *
      * @param author the author
      * @param rawString the raw message as the author typed it before any styling
-     * @param isAsync whether or not this is being processed asynchronously
-     * @param canColor whether or not the author can use colors in chat
+     * @param isAsync whether this is being processed asynchronously
+     * @param canColor whether the author can use colors in chat
      */
     public void processChatMessage(@NotNull Author author, @NotNull String rawString, @NotNull Party party, boolean isAsync, boolean canColor, boolean isLeader) {
         PartyChatMessage chatMessage = new PartyChatMessage(pluginRef, author, constructPartyAudience(party), rawString, addStyle(author, rawString, canColor, isLeader), party);

+ 2 - 7
src/main/java/com/gmail/nossr50/config/AdvancedConfig.java

@@ -17,11 +17,6 @@ public class AdvancedConfig extends BukkitConfig {
         validate();
     }
 
-    @Override
-    public void initDefaults() {
-        config.addDefault("Skills.General.StartingLevel", 0);
-    }
-
     @Override
     protected boolean validateKeys() {
         // Validate all the settings!
@@ -427,7 +422,7 @@ public class AdvancedConfig extends BukkitConfig {
 
     /**
      * This returns the maximum level at which superabilities will stop lengthening from scaling alongside skill level.
-     * It returns a different value depending on whether or not the server is in retro mode
+     * It returns a different value depending on whether the server is in retro mode
      *
      * @return the level at which abilities stop increasing in length
      */
@@ -440,7 +435,7 @@ public class AdvancedConfig extends BukkitConfig {
 
     /**
      * This returns the frequency at which abilities will increase in length
-     * It returns a different value depending on whether or not the server is in retro mode
+     * It returns a different value depending on whether the server is in retro mode
      *
      * @return the number of levels required per ability length increase
      */

+ 75 - 110
src/main/java/com/gmail/nossr50/config/BukkitConfig.java

@@ -7,53 +7,112 @@ import org.jetbrains.annotations.NotNull;
 
 import java.io.*;
 import java.util.HashSet;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.List;
 import java.util.Set;
 
 public abstract class BukkitConfig {
-    public static final String CONFIG_PATCH_PREFIX = "ConfigPatchVersion:";
-    public static final String CURRENT_CONFIG_PATCH_VER = "ConfigPatchVersion: 2";
-    public static final char COMMENT_PREFIX = '#';
+    boolean copyDefaults = true;
     protected final String fileName;
     protected final File configFile;
+    protected YamlConfiguration defaultYamlConfig;
     protected YamlConfiguration config;
-    protected @NotNull
-    final File dataFolder;
+    protected @NotNull final File dataFolder;
 
     public BukkitConfig(@NotNull String fileName, @NotNull File dataFolder) {
         mcMMO.p.getLogger().info("[config] Initializing config: " + fileName);
         this.fileName = fileName;
         this.dataFolder = dataFolder;
         configFile = new File(dataFolder, fileName);
-        // purgeComments(true);
+        this.defaultYamlConfig = copyDefaultConfig();
+        this.config = initConfig();
+        updateFile();
+        mcMMO.p.getLogger().info("[config] Config initialized: " + fileName);
+    }
+
+    public BukkitConfig(@NotNull String fileName, @NotNull File dataFolder, boolean copyDefaults) {
+        mcMMO.p.getLogger().info("[config] Initializing config: " + fileName);
+        this.copyDefaults = copyDefaults;
+        this.fileName = fileName;
+        this.dataFolder = dataFolder;
+        configFile = new File(dataFolder, fileName);
+        this.defaultYamlConfig = copyDefaultConfig();
         this.config = initConfig();
-        initDefaults();
         updateFile();
         mcMMO.p.getLogger().info("[config] Config initialized: " + fileName);
     }
 
-    @Deprecated
     public BukkitConfig(@NotNull String fileName) {
         this(fileName, mcMMO.p.getDataFolder());
     }
-
-    /**
-     * Initialize default values for the config
-     */
-    public void initDefaults() {}
+    public BukkitConfig(@NotNull String fileName, boolean copyDefaults) {
+        this(fileName, mcMMO.p.getDataFolder(), copyDefaults);
+    }
 
     /**
      * Update the file on the disk by copying out any new and missing defaults
      */
     public void updateFile() {
         try {
+            if(copyDefaults) {
+                copyMissingDefaultsFromResource();
+            }
             config.save(configFile);
         } catch (IOException e) {
             e.printStackTrace();
         }
     }
 
-    private YamlConfiguration initConfig() {
+    /**
+     * Copies missing keys and values from the internal resource config within the JAR
+     */
+    private void copyMissingDefaultsFromResource() {
+        boolean updated = false;
+        for (String key : defaultYamlConfig.getKeys(true)) {
+            if (!config.contains(key)) {
+                config.set(key, defaultYamlConfig.get(key));
+                updated = true;
+            }
+        }
+
+        if (updated) {
+            updateFile();
+        }
+    }
+
+    /**
+     * Copies the config from the JAR to defaults/<fileName>
+     */
+    YamlConfiguration copyDefaultConfig() {
+        mcMMO.p.getLogger().info("[config] Copying default config to disk: " + fileName + " to defaults/" + fileName);
+        try(InputStream inputStream = mcMMO.p.getResource(fileName)) {
+            if(inputStream == null) {
+                mcMMO.p.getLogger().severe("[config] Unable to copy default config: " + fileName);
+                return null;
+            }
+
+            //Save default file into defaults/<fileName>
+            File defaultsFolder = new File(dataFolder, "defaults");
+            if (!defaultsFolder.exists()) {
+                defaultsFolder.mkdir();
+            }
+            File defaultFile = new File(defaultsFolder, fileName);
+            Path path = defaultFile.toPath();
+            Files.copy(inputStream, path, java.nio.file.StandardCopyOption.REPLACE_EXISTING);
+
+            // Load file into YAML config
+            YamlConfiguration defaultYamlConfig = new YamlConfiguration();
+            defaultYamlConfig.load(defaultFile);
+            return defaultYamlConfig;
+        } catch (IOException | InvalidConfigurationException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    YamlConfiguration initConfig() {
         if (!configFile.exists()) {
             mcMMO.p.getLogger().info("[config] User config file not found, copying a default config to disk: " + fileName);
             mcMMO.p.saveResource(fileName, false);
@@ -106,8 +165,8 @@ public abstract class BukkitConfig {
     }
 
     public void backup() {
-        mcMMO.p.getLogger().severe("You are using an old version of the " + fileName + " file.");
-        mcMMO.p.getLogger().severe("Your old file has been renamed to " + fileName + ".old and has been replaced by an updated version.");
+        mcMMO.p.getLogger().info("You are using an old version of the " + fileName + " file.");
+        mcMMO.p.getLogger().info("Your old file has been renamed to " + fileName + ".old and has been replaced by an updated version.");
 
         configFile.renameTo(new File(configFile.getPath() + ".old"));
 
@@ -123,98 +182,4 @@ public abstract class BukkitConfig {
     public File getFile() {
         return configFile;
     }
-
-//    /**
-//     * Somewhere between December 2021-January 2022 Spigot updated their
-//     * SnakeYAML dependency/API and due to our own crappy legacy code
-//     * this introduced a very problematic bug where comments got duplicated
-//     * <p>
-//     * This method hotfixes the problem by just deleting any existing comments
-//     * it's ugly, but it gets the job done
-//     *
-//     * @param silentFail when true mcMMO will report errors during the patch process or debug information
-//     *                   the option to have it fail silently is because mcMMO wants to check files before they are parsed as a file with a zillion comments will fail to even load
-//     */
-//    private void purgeComments(boolean silentFail) {
-//        if(!configFile.exists())
-//            return;
-//
-//        int dupedLines = 0, lineCount = 0, lineCountAfter = 0;
-//        try (FileReader fileReader = new FileReader(configFile);
-//             BufferedReader bufferedReader = new BufferedReader(fileReader)) {
-//            StringBuilder stringBuilder = new StringBuilder();
-//            String line;
-//            Set<String> seenBefore = new HashSet<>();
-//
-//            stringBuilder.append(CURRENT_CONFIG_PATCH_VER).append(System.lineSeparator());
-//            boolean noPatchNeeded = false;
-//
-//            // While not at the end of the file
-//            while ((line = bufferedReader.readLine()) != null) {
-//                lineCount++;
-//
-//                if(line.startsWith(CURRENT_CONFIG_PATCH_VER)) {
-//                    noPatchNeeded = true;
-//                    break;
-//                }
-//
-//                //Older version, don't append this line
-//                if(line.startsWith(CONFIG_PATCH_PREFIX))
-//                    continue;
-//
-//                if (isFirstCharAsciiCharacter(line, COMMENT_PREFIX)) {
-//                    if(seenBefore.contains(line))
-//                        dupedLines++;
-//                    else
-//                        seenBefore.add(line);
-//
-//                    continue; //Delete the line by not appending it
-//                }
-//
-//                stringBuilder
-//                        .append(line) //Convert existing files into two-spaced format
-//                        .append(System.lineSeparator());
-//                lineCountAfter++;
-//            }
-//
-//            if(noPatchNeeded)
-//                return;
-//
-//            if(lineCount == 0 && !silentFail) {
-//                mcMMO.p.getLogger().info("[config patcher] Config line count: " + lineCount);
-//                throw new InvalidConfigurationException("[config patcher] Patching of config file resulted in an empty file, this will not be saved. Contact the mcMMO devs!");
-//            }
-//
-//            if(dupedLines > 0 && !silentFail) {
-//                mcMMO.p.getLogger().info("[config patcher] Found "+dupedLines+" duplicate comments in config file: " + configFile.getName());
-//                mcMMO.p.getLogger().info("[config patcher] Purging the duplicate comments... (Nothing is broken, this is just info used for debugging)");
-//                mcMMO.p.getLogger().info("[config patcher] Line count before: "+lineCount);
-//                mcMMO.p.getLogger().info("[config patcher] Line count after: "+lineCountAfter);
-//            }
-//
-//            // Write out the *patched* file
-//            // AKA the file without any comments
-//            try (FileWriter fileWriter = new FileWriter(configFile)) {
-//                fileWriter.write(stringBuilder.toString());
-//            }
-//        } catch (IOException | InvalidConfigurationException ex) {
-//            mcMMO.p.getLogger().severe("Failed to patch config file: " + configFile.getName());
-//            ex.printStackTrace();
-//        }
-//    }
-
-    private boolean isFirstCharAsciiCharacter(String line, char character) {
-        if(line == null || line.isEmpty()) {
-            return true;
-        }
-
-        for(Character c : line.toCharArray()) {
-            if(c.equals(' '))
-                continue;
-
-            return c.equals(character);
-        }
-
-        return false;
-    }
 }

+ 1 - 1
src/main/java/com/gmail/nossr50/config/ChatConfig.java

@@ -40,7 +40,7 @@ public class ChatConfig extends BukkitConfig {
     }
 
     /**
-     * Whether or not to use display names for players in target {@link ChatChannel}
+     * Whether to use display names for players in target {@link ChatChannel}
      *
      * @param chatChannel target chat channel
      *

+ 2 - 2
src/main/java/com/gmail/nossr50/config/CoreSkillsConfig.java

@@ -35,7 +35,7 @@ public class CoreSkillsConfig extends BukkitConfig {
      */
 
     /**
-     * Whether or not a skill is enabled
+     * Whether a skill is enabled
      * Defaults true
      *
      * @param abstractSubSkill SubSkill definition to check
@@ -47,7 +47,7 @@ public class CoreSkillsConfig extends BukkitConfig {
     }
 
     /**
-     * Whether or not this primary skill is enabled
+     * Whether this primary skill is enabled
      *
      * @param primarySkillType target primary skill
      *

+ 0 - 6
src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java

@@ -25,12 +25,6 @@ public class ExperienceConfig extends BukkitConfig {
         validate();
     }
 
-    @Override
-    public void initDefaults() {
-       config.addDefault("ExploitFix.Combat.XPCeiling.Enabled", true);
-       config.addDefault("ExploitFix.Combat.XPCeiling.Damage_Limit", 100);
-    }
-
     public static ExperienceConfig getInstance() {
         if (instance == null) {
             instance = new ExperienceConfig();

+ 1 - 1
src/main/java/com/gmail/nossr50/config/skills/repair/RepairConfig.java

@@ -18,7 +18,7 @@ public class RepairConfig extends BukkitConfig {
     private List<Repairable> repairables;
 
     public RepairConfig(String fileName) {
-        super(fileName);
+        super(fileName, false);
         notSupported = new HashSet<>();
         loadKeys();
     }

+ 1 - 1
src/main/java/com/gmail/nossr50/config/treasure/FishingTreasureConfig.java

@@ -28,7 +28,7 @@ public class FishingTreasureConfig extends BukkitConfig {
     public @NotNull HashMap<EntityType, List<ShakeTreasure>> shakeMap = new HashMap<>();
 
     private FishingTreasureConfig() {
-        super(FILENAME);
+        super(FILENAME, false);
         loadKeys();
         validate();
     }

+ 1 - 1
src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java

@@ -35,7 +35,7 @@ public class TreasureConfig extends BukkitConfig {
     public HashMap<String, List<HylianTreasure>> hylianMap = new HashMap<>();
 
     private TreasureConfig() {
-        super(FILENAME);
+        super(FILENAME, false);
         loadKeys();
         validate();
     }

+ 3 - 3
src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java

@@ -577,7 +577,7 @@ public class McMMOPlayer implements Identified {
     }
 
     /**
-     * Whether or not a player is level capped
+     * Whether a player is level capped
      * If they are at the power level cap, this will return true, otherwise it checks their skill level
      * @param primarySkillType
      * @return
@@ -590,7 +590,7 @@ public class McMMOPlayer implements Identified {
     }
 
     /**
-     * Whether or not a player is power level capped
+     * Whether a player is power level capped
      * Compares their power level total to the current set limit
      * @return true if they have reached the power level cap
      */
@@ -912,7 +912,7 @@ public class McMMOPlayer implements Identified {
             return;
         }
 
-        //These values change depending on whether or not the server is in retro mode
+        //These values change depending on whether the server is in retro mode
         int abilityLengthVar = mcMMO.p.getAdvancedConfig().getAbilityLength();
         int abilityLengthCap = mcMMO.p.getAdvancedConfig().getAbilityLengthCap();
 

+ 1 - 1
src/main/java/com/gmail/nossr50/datatypes/skills/interfaces/Toolable.java

@@ -6,7 +6,7 @@ import java.util.Collection;
 
 public interface Toolable {
     /**
-     * Whether or not this Skill requires a tool
+     * Whether this Skill requires a tool
      * Not all skills will require a tool
      * @return true if tool is required
      */

+ 1 - 1
src/main/java/com/gmail/nossr50/datatypes/skills/subskills/AbstractSubSkill.java

@@ -35,7 +35,7 @@ public abstract class AbstractSubSkill implements SubSkill, Interaction, Rank, S
     }
 
     /**
-     * Whether or not this subskill is enabled
+     * Whether this subskill is enabled
      *
      * @return true if enabled
      */

+ 1 - 1
src/main/java/com/gmail/nossr50/datatypes/skills/subskills/interfaces/SubSkill.java

@@ -64,7 +64,7 @@ public interface SubSkill extends Skill {
     void addStats(TextComponent.Builder componentBuilder, Player player);
 
     /**
-     * Whether or not this subskill is enabled
+     * Whether this subskill is enabled
      * @return true if enabled
      */
     boolean isEnabled();

+ 2 - 2
src/main/java/com/gmail/nossr50/metadata/MobMetadataService.java

@@ -56,7 +56,7 @@ public class MobMetadataService {
     }
 
     /**
-     * Whether or not a target {@link LivingEntity} has a specific mcMMO mob flags
+     * Whether a target {@link LivingEntity} has a specific mcMMO mob flags
      *
      * @param flag         the type of mob flag to check for
      * @param livingEntity the living entity to check for metadata
@@ -76,7 +76,7 @@ public class MobMetadataService {
     }
 
     /**
-     * Whether or not a target {@link LivingEntity} has any mcMMO mob flags
+     * Whether a target {@link LivingEntity} has any mcMMO mob flags
      *
      * @param livingEntity the living entity to check for metadata
      *

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java

@@ -476,7 +476,7 @@ public class TamingManager extends SkillManager {
     }
 
     /**
-     * Whether or not the itemstack is used for COTW
+     * Whether the itemstack is used for COTW
      * @param itemStack target ItemStack
      * @return true if it is used for any COTW
      */

+ 1 - 1
src/main/java/com/gmail/nossr50/util/Misc.java

@@ -303,7 +303,7 @@ public final class Misc {
     }
 
     /**
-     * Whether or not a player is the party leader of a party
+     * Whether a player is the party leader of a party
      *
      * @param mmoPlayer target player
      * @return true if the player is the party leader

+ 1 - 1
src/main/java/com/gmail/nossr50/util/compat/CompatibilityLayer.java

@@ -5,7 +5,7 @@ package com.gmail.nossr50.util.compat;
  */
 public interface CompatibilityLayer {
     /**
-     * Whether or not this CompatibilityLayer successfully initialized and in theory should be functional
+     * Whether this CompatibilityLayer successfully initialized and in theory should be functional
      * @return true if this CompatibilityLayer is functional
      */
     default boolean noErrorsOnInitialize() { return true; };

+ 4 - 1
src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java

@@ -151,7 +151,10 @@ public class ExperienceBarWrapper {
 
     private void createBossBar()
     {
-        bossBar = mcMMOPlayer.getPlayer().getServer().createBossBar(title, ExperienceConfig.getInstance().getExperienceBarColor(primarySkillType), ExperienceConfig.getInstance().getExperienceBarStyle(primarySkillType));
+        bossBar = mcMMOPlayer.getPlayer().getServer().createBossBar(
+                title,
+                ExperienceConfig.getInstance().getExperienceBarColor(primarySkillType),
+                ExperienceConfig.getInstance().getExperienceBarStyle(primarySkillType));
         bossBar.addPlayer(mcMMOPlayer.getPlayer());
     }
 }

+ 1 - 1
src/main/java/com/gmail/nossr50/util/platform/MajorMinorPatchVersion.java

@@ -84,7 +84,7 @@ public abstract class MajorMinorPatchVersion implements Versioned {
     }
 
     /**
-     * Whether or not this version of Minecraft is a patch
+     * Whether this version of Minecraft is a patch
      * a patch version value above 0 will indicate that this is a patch
      * @return true if this version is a patch
      */

+ 1 - 1
src/main/java/com/gmail/nossr50/util/platform/MinecraftGameVersion.java

@@ -28,7 +28,7 @@ public class MinecraftGameVersion extends MajorMinorPatchVersion {
     }
 
     /**
-     * Returns whether or not the Minecraft version is at least equal to or higher than a target version
+     * Returns whether the Minecraft version is at least equal to or higher than a target version
      * @param majorVerNumber target major version number - for example 1.16.5 , the 1 is the major version
      * @param minorVerNumber target minor version number - for example 1.16.5, the 16 is the minor version
      * @param patchVerNumber target patch version number - for example 1.16.5, the 5 is the patch version number

+ 4 - 4
src/main/java/com/gmail/nossr50/util/skills/RankUtils.java

@@ -104,7 +104,7 @@ public class RankUtils {
     }
 
     /**
-     * Returns whether or not the player has unlocked the first rank in target subskill
+     * Returns whether the player has unlocked the first rank in target subskill
      * @param player the player
      * @param subSkillType the target subskill
      * @return true if the player has at least one rank in the skill
@@ -118,7 +118,7 @@ public class RankUtils {
     }
 
     /**
-     * Returns whether or not the player has unlocked the first rank in target subskill
+     * Returns whether the player has unlocked the first rank in target subskill
      * @param player the player
      * @param abstractSubSkill the target subskill
      * @return true if the player has at least one rank in the skill
@@ -132,7 +132,7 @@ public class RankUtils {
     }
 
     /**
-     * Returns whether or not the player has reached the specified rank in target subskill
+     * Returns whether the player has reached the specified rank in target subskill
      * @param rank the target rank
      * @param player the player
      * @param subSkillType the target subskill
@@ -144,7 +144,7 @@ public class RankUtils {
     }
 
     /**
-     * Returns whether or not the player has reached the specified rank in target subskill
+     * Returns whether the player has reached the specified rank in target subskill
      * @param rank the target rank
      * @param player the player
      * @param abstractSubSkill the target subskill

+ 3 - 3
src/main/resources/chat.yml

@@ -6,15 +6,15 @@ Chat:
         Party:
             # Enable or disable party chat
             Enable: true
-            # Whether or not to use the current display name of a player
+            # Whether to use the current display name of a player
             Use_Display_Names: true
             Spies:
-                # Whether or not players with the chat spy permission join the server with chat spying toggled on
+                # Whether players with the chat spy permission join the server with chat spying toggled on
                 Automatically_Enable_Spying: false
         Admin:
             # Enable or disable admin chat
             Enable: true
-            # Whether or not to use the current display name of a player
+            # Whether to use the current display name of a player
             Use_Display_Names: true
 # CUSTOMIZATION INFORMATION
 # If you want to customize the look and feel of chat channels, that is handled through localization which is configurable

+ 8 - 11
src/main/resources/config.yml

@@ -10,9 +10,9 @@
 General:
     # When players reach certain level milestones messages will be broadcast
     Level_Up_Chat_Broadcasts:
-        # Whether or not level up broadcasts are enabled
+        # Whether level up broadcasts are enabled
         Enabled: true
-        # Whether or not you want power level milestones to be broadcast
+        # Whether you want power level milestones to be broadcast
         Broadcast_Powerlevels:
             Enabled: true
             # How often to broadcast, you can change this to 1 to always broadcast a level up event, a setting of 100 will limit it to every 100 levels (for example level 100, level 200, etc)
@@ -20,9 +20,9 @@ General:
             Broadcast_Targets:
                 # Send the message to the console as well
                 Send_To_Console: true
-                # Whether or not to only send chat messages to party members
+                # Whether to only send chat messages to party members
                 Only_Party_Members: false
-                # Whether or not players who recieve a level up broadcast have to be on the same world as the one who leveled up
+                # Whether players who receive a level up broadcast have to be on the same world as the one who leveled up
                 Only_Same_World: false
                 # Distance restrictions
                 Distance_Restrictions:
@@ -34,9 +34,9 @@ General:
         Broadcast_Targets:
             # Send the message to the console as well
             Send_To_Console: true
-            # Whether or not to only send chat messages to party members
+            # Whether to only send chat messages to party members
             Only_Party_Members: false
-            # Whether or not players who recieve a level up broadcast have to be on the same world as the one who leveled up
+            # Whether players who recieve a level up broadcast have to be on the same world as the one who leveled up
             Only_Same_World: false
             # Distance restrictions
             Distance_Restrictions:
@@ -44,7 +44,7 @@ General:
                 # When using Restrict_Distance the blow setting configures the range of the broadcast
                 Restricted_Radius: 100
         # Turning this on will scale mcMMO around 1-1000 with default scaling factor
-        # Everything in your config related to skill level requirements, skill level bonuses, etc will be multiplied by 10 when this mode is on
+        # Everything in your config related to skill level requirements, skill level bonuses, etc. will be multiplied by 10 when this mode is on
         # This change is purely cosmetic, it retains the old feel of mcMMO where you could level up thousands of times
     RetroMode:
         Enabled: true
@@ -59,9 +59,6 @@ General:
     Save_Interval: 10
     # Allow mcMMO to report on basic anonymous usage
     Stats_Tracking: true
-    # Allow mcMMO to check if a new version is available
-    Update_Check: true
-    Prefer_Beta: false
     Power_Level_Cap: 0
     # Should mcMMO truncate levels if you lower your max level cap for a skillname
     TruncateSkills: true
@@ -147,7 +144,7 @@ Scoreboard:
             LevelUp_Time: 5
 
 Mob_Healthbar:
-    # Enabled: Whether or not the feature is enabled at all
+    # Enabled: Whether the feature is enabled at all
     # Display_Type: Per player Default display for mob health bars - HEARTS, BAR, or DISABLED
     Enabled: true
     Display_Type: HEARTS

+ 1 - 1
src/main/resources/experience.yml

@@ -41,7 +41,7 @@ ExploitFix:
     SnowGolemExcavation: true
     # This include NPCs from stuff like Citizens, this is not a setting for Vanilla Minecraft Villagers (Which can be considered NPCs)
     # mcMMO normally doesn't process attacks against an Entity if it is an NPC from another plugin
-    # Of course, mcMMO doesn't know for sure whether or not something is an NPC, it checks a few known things, see our source code to see how
+    # Of course, mcMMO doesn't know for sure whether something is an NPC, it checks a few known things, see our source code to see how
     PreventPluginNPCInteraction: true
 Fishing_ExploitFix_Options:
     MoveRange: 3

+ 1 - 1
src/main/resources/locale/locale_cs_CZ.properties

@@ -646,4 +646,4 @@ Scoreboard.Misc.RemainingXP=Zbývající XP
 Scoreboard.Misc.Overall=Celkově
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_cy.properties

@@ -467,4 +467,4 @@ Skills.AbilityGateRequirementFail=
 Smelting.SubSkill.UnderstandingTheArt.Name=
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_da.properties

@@ -466,4 +466,4 @@ MOTD.Version=&6[mcMMO] Kører version &3{0}
 MOTD.Website=&6[mcMMO] &a{0}&e - mcMMO Hjemmeside
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 5 - 5
src/main/resources/locale/locale_en_US.properties

@@ -172,7 +172,7 @@ Archery.SubSkill.ArrowRetrieval.Name=Arrow Retrieval
 Archery.SubSkill.ArrowRetrieval.Description=Chance to retrieve arrows from corpses
 Archery.SubSkill.ArrowRetrieval.Stat=Arrow Recovery Chance
 Archery.SubSkill.ArcheryLimitBreak.Name=Archery Limit Break
-Archery.SubSkill.ArcheryLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
+Archery.SubSkill.ArcheryLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether it will boost damage in PVE.
 Archery.SubSkill.ArcheryLimitBreak.Stat=Limit Break Max DMG
 Archery.Listener=Archery:
 Archery.SkillName=ARCHERY
@@ -200,7 +200,7 @@ Axes.SubSkill.CriticalStrikes.Stat=Critical Strike Chance
 Axes.SubSkill.AxeMastery.Name=Axe Mastery
 Axes.SubSkill.AxeMastery.Description=Adds bonus DMG
 Axes.SubSkill.AxesLimitBreak.Name=Axes Limit Break
-Axes.SubSkill.AxesLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
+Axes.SubSkill.AxesLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether it will boost damage in PVE.
 Axes.SubSkill.AxesLimitBreak.Stat=Limit Break Max DMG
 Axes.SubSkill.ArmorImpact.Name=Armor Impact
 Axes.SubSkill.ArmorImpact.Description=Strike with enough force to shatter armor
@@ -426,7 +426,7 @@ Swords.SubSkill.Stab.Name=Stab
 Swords.SubSkill.Stab.Description=Adds bonus damage to your attacks.
 Swords.SubSkill.Stab.Stat=Stab Damage
 Swords.SubSkill.SwordsLimitBreak.Name=Swords Limit Break
-Swords.SubSkill.SwordsLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
+Swords.SubSkill.SwordsLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether it will boost damage in PVE.
 Swords.SubSkill.SwordsLimitBreak.Stat=Limit Break Max DMG
 Swords.SubSkill.Rupture.Stat=Rupture Chance
 Swords.SubSkill.Rupture.Stat.Extra=[[DARK_AQUA]]Rupture Duration: &e{0}s&a vs Players, &e{1}s&a vs Mobs.
@@ -508,7 +508,7 @@ Unarmed.SubSkill.Disarm.Name=Disarm
 Unarmed.SubSkill.Disarm.Description=Drops the foes item held in hand
 Unarmed.SubSkill.Disarm.Stat=Disarm Chance
 Unarmed.SubSkill.UnarmedLimitBreak.Name=Unarmed Limit Break
-Unarmed.SubSkill.UnarmedLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether or not it will boost damage in PVE.
+Unarmed.SubSkill.UnarmedLimitBreak.Description=Breaking your limits. Increased damage against tough opponents. Intended for PVP, up to server settings for whether it will boost damage in PVE.
 Unarmed.SubSkill.UnarmedLimitBreak.Stat=Limit Break Max DMG
 Unarmed.SubSkill.SteelArmStyle.Name=Steel Arm Style
 Unarmed.SubSkill.SteelArmStyle.Description=Hardens your arm over time
@@ -1128,7 +1128,7 @@ LevelCap.PowerLevel=&6(&amcMMO&6) &eYou have reached the power level cap of &c{0
 LevelCap.Skill=&6(&amcMMO&6) &eYou have reached the level cap of &c{0}&e for &6{1}&e. You will cease to level in this skill from this point on.
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.
 Compatibility.Layer.Unsupported=&6Compatibility for &a{0}&6 is not supported by this version of Minecraft.
 Compatibility.Layer.PartialSupport=&6Compatibility for &a{0}&6 is not fully supported by this version of Minecraft, but mcMMO is running a secondary system to emulate some of the missing features.
 Commands.XPBar.DisableAll=&6 All mcMMO XP bars are now disabled, use /mmoxpbar reset to restore default settings.

+ 1 - 1
src/main/resources/locale/locale_es.properties

@@ -674,4 +674,4 @@ Scoreboard.Misc.RemainingXP=XP restante
 Scoreboard.Misc.Overall=Total
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_fi.properties

@@ -199,4 +199,4 @@ Stats.Header.Misc=&6-=SEKALAISET TAIDOT=-
 Stats.Own.Stats=&a[mcMMO] Tilastot
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_it.properties

@@ -1139,4 +1139,4 @@ LevelCap.PowerLevel=&6(&amcMMO&6) &eHai raggiunto il livello massimo di potenza
 LevelCap.Skill=&6(&amcMMO&6) &eHai raggiunto il livello massimo di &c{0}&e per &6{1}&e. Da questo punto in poi cesserai di salire di livello in questa abilità.
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_ko.properties

@@ -990,7 +990,7 @@ Profile.Loading.Failure=mcMMO는 여전히 당신의 데이터를 읽을 수 없
 Profile.Loading.AdminFailureNotice=&4[A]&c mcMMO는 &e{0}&c 플레이어 데이터 읽기가 불가능합니다. &d당신의 데이터베이스 설치를 검사해주세요.
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.
 
 #OVERHAULs
 Overhaul.Levelup=&l{0} &r(이)가 레벨  &r&a&l{2}&r&f 로 성장 했습니다.

+ 1 - 1
src/main/resources/locale/locale_nl.properties

@@ -430,4 +430,4 @@ Scoreboard.Misc.RemainingXP=Resterende XP
 Scoreboard.Misc.Overall=Globaal
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_sv.properties

@@ -151,4 +151,4 @@ Stats.Header.Misc=&6-=Varierande Färdogheter=-
 Stats.Own.Stats=&a[mcMMO] Stats
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/locale/locale_th_TH.properties

@@ -634,4 +634,4 @@ UpdateChecker.Outdated=You are using an outdated version of mcMMO!
 UpdateChecker.NewAvailable=There is a new version available on BukkitDev.
 Commands.XPBar.Usage=Proper usage is /mmoxpbar <skillname | reset> <show | hide>
 Commands.Description.mmoxpbar=Player settings for mcMMO XP bars
-Commands.Description.mmocompat=Information about mcMMO and whether or not its in compatibility mode or fully functional.
+Commands.Description.mmocompat=Information about mcMMO and whether its in compatibility mode or fully functional.

+ 1 - 1
src/main/resources/mods/armor.default.yml

@@ -8,7 +8,7 @@
 # The bare minimum of an Armor piece is that it has a Repair_Material
 #
 #
-# Repairable: Whether or not the item is repairable
+# Repairable: Whether the item is repairable
 ## This defaults to true
 #
 # Repair_Material: This is the material name of the item used to repair this armor.

+ 2 - 2
src/main/resources/mods/tools.default.yml

@@ -18,10 +18,10 @@
 ## Valid values range from 1 to 4
 ## This defaults to 1
 #
-# Ability_Enabled: Whether or not abilities are enabled with this tool
+# Ability_Enabled: Whether abilities are enabled with this tool
 ## This defaults to true
 #
-# Repairable: Whether or not the item is repairable
+# Repairable: Whether the item is repairable
 ## This defaults to true
 #
 # Repair_Material: This is the material name of the item used to repair this tool.

+ 2 - 2
src/main/resources/plugin.yml

@@ -26,7 +26,7 @@ commands:
         aliases: xpbarsettings
         description: Change XP bar settings
     mmocompat:
-        description: Information about the server and whether or not its considered fully compatible or running in compatibility mode
+        description: Information about the server and whether its considered fully compatible or running in compatibility mode
     mmodebug:
         aliases: [mcmmodebugmode]
         description: Toggles a debug mode which will print useful information to chat
@@ -54,7 +54,7 @@ commands:
         description: Add mcMMO levels to a user
         permission: mcmmo.commands.addlevels
     mcability:
-        description: Toggle whether or not abilities get readied on right click
+        description: Toggle whether abilities get readied on right click
         permission: mcmmo.commands.mcability
     mcrefresh:
         description: Refresh all cooldowns for mcMMO