Преглед на файлове

Merge branch 'Butzlabben:master' into improvement/game-end-message

RedstoneFuture преди 3 години
родител
ревизия
7441a4e7a7

+ 33 - 0
.github/ISSUE_TEMPLATE/bug_report.md

@@ -0,0 +1,33 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Server (please complete the following information):**
+ - OS: [e.g. Debian, Windows]
+ - Minecraft version [e.g. 1.12, 1.16, 1.17]
+ - Java version [e.g. 11, 17]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.

+ 20 - 0
.github/ISSUE_TEMPLATE/feature_request.md

@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.

+ 1 - 1
missilewars-plugin/pom.xml

@@ -26,7 +26,7 @@
         <version>1.0</version>
         <version>1.0</version>
     </parent>
     </parent>
 
 
-    <version>4.1.0</version>
+    <version>4.1.2</version>
 
 
     <modelVersion>4.0.0</modelVersion>
     <modelVersion>4.0.0</modelVersion>
 
 

+ 53 - 49
missilewars-plugin/src/main/java/de/butzlabben/missilewars/Config.java

@@ -19,23 +19,20 @@
 package de.butzlabben.missilewars;
 package de.butzlabben.missilewars;
 
 
 import de.butzlabben.missilewars.game.GameManager;
 import de.butzlabben.missilewars.game.GameManager;
-import de.butzlabben.missilewars.util.SetupUtil;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
 import org.bukkit.Bukkit;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.Material;
-import static org.bukkit.Material.JUKEBOX;
-import static org.bukkit.Material.valueOf;
 import org.bukkit.World;
 import org.bukkit.World;
 import org.bukkit.configuration.ConfigurationSection;
 import org.bukkit.configuration.ConfigurationSection;
 import org.bukkit.configuration.file.YamlConfiguration;
 import org.bukkit.configuration.file.YamlConfiguration;
 
 
+import java.io.*;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+
+import static org.bukkit.Material.JUKEBOX;
+import static org.bukkit.Material.valueOf;
+
 /**
 /**
  * @author Butzlabben
  * @author Butzlabben
  * @since 01.01.2018
  * @since 01.01.2018
@@ -45,39 +42,49 @@ public class Config {
     private static final File dir = MissileWars.getInstance().getDataFolder();
     private static final File dir = MissileWars.getInstance().getDataFolder();
     private static final File file = new File(MissileWars.getInstance().getDataFolder(), "config.yml");
     private static final File file = new File(MissileWars.getInstance().getDataFolder(), "config.yml");
     private static YamlConfiguration cfg;
     private static YamlConfiguration cfg;
+    private static boolean configNew = false;
 
 
     public static void load() {
     public static void load() {
-        boolean configNew = false;
 
 
+        // check if the directory "/MissileWars" exists
         if (!dir.exists())
         if (!dir.exists())
             dir.mkdirs();
             dir.mkdirs();
 
 
-        SetupUtil.checkMissiles();
+        // check if the config file exists
         if (!file.exists()) {
         if (!file.exists()) {
-            configNew = true;
-            dir.mkdirs();
             try {
             try {
                 file.createNewFile();
                 file.createNewFile();
             } catch (IOException e) {
             } catch (IOException e) {
-                Logger.ERROR.log("Could not create config!");
+                Logger.ERROR.log("Could not create config.yml!");
                 e.printStackTrace();
                 e.printStackTrace();
             }
             }
+            configNew = true;
         }
         }
 
 
+        // try to load the config
         try {
         try {
-            cfg = YamlConfiguration
-                    .loadConfiguration(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
-        } catch (FileNotFoundException e1) {
+            cfg = YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
+        } catch (FileNotFoundException e) {
             Logger.ERROR.log("Couldn't load config.yml");
             Logger.ERROR.log("Couldn't load config.yml");
-            e1.printStackTrace();
+            e.printStackTrace();
             return;
             return;
         }
         }
 
 
+        // copy the config input
         cfg.options().copyDefaults(true);
         cfg.options().copyDefaults(true);
 
 
+        // validate the config options
+        addDefaults();
+
+        // re-save the config with only validated options
+        saveConfig();
+    }
+
+    private static void addDefaults() {
         cfg.addDefault("debug", false);
         cfg.addDefault("debug", false);
-        if (debug())
+        if (debug()) {
             Logger.DEBUG.log("Debug enabled");
             Logger.DEBUG.log("Debug enabled");
+        }
 
 
         cfg.addDefault("setup_mode", false);
         cfg.addDefault("setup_mode", false);
 
 
@@ -131,10 +138,13 @@ public class Config {
             cfg.addDefault("sidebar.entries.2", "   ");
             cfg.addDefault("sidebar.entries.2", "   ");
             cfg.addDefault("sidebar.entries.1", "%team2% §7» %team2_color%%team2_amount%");
             cfg.addDefault("sidebar.entries.1", "%team2% §7» %team2_color%%team2_amount%");
         }
         }
+    }
+
+    private static void saveConfig() {
         try {
         try {
             cfg.save(file);
             cfg.save(file);
         } catch (IOException e) {
         } catch (IOException e) {
-            Logger.ERROR.log("Could not save config!");
+            Logger.ERROR.log("Could not save config.yml!");
             e.printStackTrace();
             e.printStackTrace();
         }
         }
     }
     }
@@ -148,25 +158,19 @@ public class Config {
         return ret;
         return ret;
     }
     }
 
 
+    /**
+     * This method gets the minecraft material type of the block to start missiles.
+     */
     public static Material getStartReplace() {
     public static Material getStartReplace() {
-        String name = cfg.getString("replace.material", "JUKEBOX").toUpperCase();
+        String name = cfg.getString("replace.material").toUpperCase();
         try {
         try {
             return valueOf(name);
             return valueOf(name);
         } catch (Exception e) {
         } catch (Exception e) {
-            Logger.WARN.log("Unknown material " + name + " in start_replace");
+            Logger.WARN.log("Could not use " + name + " as start material!");
         }
         }
         return null;
         return null;
     }
     }
 
 
-    public static void save(YamlConfiguration cfg) {
-        try {
-            cfg.save(file);
-        } catch (IOException e) {
-            Logger.ERROR.log("Couldn't save config");
-            e.printStackTrace();
-        }
-    }
-
     public static Location getFallbackSpawn() {
     public static Location getFallbackSpawn() {
         ConfigurationSection cfg = Config.cfg.getConfigurationSection("fallback_spawn");
         ConfigurationSection cfg = Config.cfg.getConfigurationSection("fallback_spawn");
         World world = Bukkit.getWorld(cfg.getString("world"));
         World world = Bukkit.getWorld(cfg.getString("world"));
@@ -187,38 +191,38 @@ public class Config {
         return location;
         return location;
     }
     }
 
 
+    public static YamlConfiguration getConfig() {
+        return cfg;
+    }
+
     public static String motdEnded() {
     public static String motdEnded() {
-        return cfg.getString("motd.ended", "&cError configuring motd in motd.ended");
+        return cfg.getString("motd.ended");
     }
     }
 
 
     public static String motdGame() {
     public static String motdGame() {
-        return cfg.getString("motd.ingame", "&cError configuring motd in motd.ingame");
+        return cfg.getString("motd.ingame");
     }
     }
 
 
     public static String motdLobby() {
     public static String motdLobby() {
-        return cfg.getString("motd.lobby", "&cError configuring motd in motd.lobby");
+        return cfg.getString("motd.lobby");
     }
     }
 
 
     public static boolean motdEnabled() {
     public static boolean motdEnabled() {
-        return cfg.getBoolean("motd.enable", true);
+        return cfg.getBoolean("motd.enable");
     }
     }
 
 
     public static int getReplaceTicks() {
     public static int getReplaceTicks() {
-        return cfg.getInt("replace.after_ticks", 1);
+        return cfg.getInt("replace.after_ticks");
     }
     }
 
 
     public static int getReplaceRadius() {
     public static int getReplaceRadius() {
-        return cfg.getInt("replace.radius", 1);
+        return cfg.getInt("replace.radius");
     }
     }
 
 
     static boolean debug() {
     static boolean debug() {
         return cfg.getBoolean("debug");
         return cfg.getBoolean("debug");
     }
     }
 
 
-    public static YamlConfiguration getConfig() {
-        return cfg;
-    }
-
     public static boolean isSetup() {
     public static boolean isSetup() {
         return cfg.getBoolean("setup_mode");
         return cfg.getBoolean("setup_mode");
     }
     }
@@ -232,31 +236,31 @@ public class Config {
     }
     }
 
 
     public static String getHost() {
     public static String getHost() {
-        return cfg.getString("mysql.host", "localhost");
+        return cfg.getString("mysql.host");
     }
     }
 
 
     public static String getDatabase() {
     public static String getDatabase() {
-        return cfg.getString("mysql.database", "db");
+        return cfg.getString("mysql.database");
     }
     }
 
 
     public static String getPort() {
     public static String getPort() {
-        return cfg.getString("mysql.port", "3306");
+        return cfg.getString("mysql.port");
     }
     }
 
 
     public static String getUser() {
     public static String getUser() {
-        return cfg.getString("mysql.user", "root");
+        return cfg.getString("mysql.user");
     }
     }
 
 
     public static String getPassword() {
     public static String getPassword() {
-        return cfg.getString("mysql.password", "");
+        return cfg.getString("mysql.password");
     }
     }
 
 
     public static String getFightsTable() {
     public static String getFightsTable() {
-        return cfg.getString("mysql.fights_table", "mw_fights");
+        return cfg.getString("mysql.fights_table");
     }
     }
 
 
     public static String getFightMembersTable() {
     public static String getFightMembersTable() {
-        return cfg.getString("mysql.fightmember_table", "mw_fightmember");
+        return cfg.getString("mysql.fightmember_table");
     }
     }
 
 
     public static String getArenaFolder() {
     public static String getArenaFolder() {

+ 27 - 7
missilewars-plugin/src/main/java/de/butzlabben/missilewars/MessageConfig.java

@@ -34,30 +34,47 @@ import org.bukkit.configuration.file.YamlConfiguration;
  */
  */
 public class MessageConfig {
 public class MessageConfig {
 
 
-    private static final File dir = new File(MissileWars.getInstance().getDataFolder(), "missiles/");
+    private static final File dir = MissileWars.getInstance().getDataFolder();
     private static final File file = new File(MissileWars.getInstance().getDataFolder(), "messages.yml");
     private static final File file = new File(MissileWars.getInstance().getDataFolder(), "messages.yml");
     private static YamlConfiguration cfg;
     private static YamlConfiguration cfg;
 
 
     public static void load() {
     public static void load() {
-        if (!file.exists()) {
+
+        // check if the directory "/MissileWars" exists
+        if (!dir.exists())
             dir.mkdirs();
             dir.mkdirs();
+
+        // check if the config file exists
+        if (!file.exists()) {
             try {
             try {
                 file.createNewFile();
                 file.createNewFile();
             } catch (IOException e) {
             } catch (IOException e) {
-                Logger.ERROR.log("Could not create properties!");
+                Logger.ERROR.log("Could not create messages.yml!");
                 e.printStackTrace();
                 e.printStackTrace();
             }
             }
         }
         }
+
+        // try to load the config
         try {
         try {
             cfg = YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
             cfg = YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
-        } catch (FileNotFoundException e1) {
+        } catch (FileNotFoundException e) {
             Logger.ERROR.log("Couldn't load messages.yml");
             Logger.ERROR.log("Couldn't load messages.yml");
-            e1.printStackTrace();
+            e.printStackTrace();
             return;
             return;
         }
         }
 
 
+        // copy the config input
         cfg.options().copyDefaults(true);
         cfg.options().copyDefaults(true);
 
 
+        // validate the config options
+        addDefaults();
+
+        // re-save the config with only validated options
+        saveConfig();
+    }
+
+    private static void addDefaults() {
+
         cfg.addDefault("prefix", "&6•&e● MissileWars &8▎  &7");
         cfg.addDefault("prefix", "&6•&e● MissileWars &8▎  &7");
 
 
         cfg.addDefault("not_in_arena", "&cYou are not in an arena right now");
         cfg.addDefault("not_in_arena", "&cYou are not in an arena right now");
@@ -122,10 +139,13 @@ public class MessageConfig {
         cfg.addDefault("vote.finished", "The map %map% &7was elected");
         cfg.addDefault("vote.finished", "The map %map% &7was elected");
         cfg.addDefault("vote.gui", "Vote for a map");
         cfg.addDefault("vote.gui", "Vote for a map");
 
 
+    }
+
+    private static void saveConfig() {
         try {
         try {
             cfg.save(file);
             cfg.save(file);
         } catch (IOException e) {
         } catch (IOException e) {
-            Logger.ERROR.log("Could not save properties!");
+            Logger.ERROR.log("Could not save messages.yml!");
             e.printStackTrace();
             e.printStackTrace();
         }
         }
     }
     }
@@ -143,6 +163,6 @@ public class MessageConfig {
     }
     }
 
 
     public static String getPrefix() {
     public static String getPrefix() {
-        return ChatColor.translateAlternateColorCodes('&', cfg.getString("prefix", "&6•&e● MissileWars &8▎  &7"));
+        return ChatColor.translateAlternateColorCodes('&', cfg.getString("prefix"));
     }
     }
 }
 }

+ 57 - 33
missilewars-plugin/src/main/java/de/butzlabben/missilewars/MissileWars.java

@@ -63,7 +63,7 @@ public class MissileWars extends JavaPlugin {
     }
     }
 
 
     /**
     /**
-     * @return the instance
+     * @return the instance of the plugin
      */
      */
     public static MissileWars getInstance() {
     public static MissileWars getInstance() {
         return instance;
         return instance;
@@ -71,37 +71,22 @@ public class MissileWars extends JavaPlugin {
 
 
     @Override
     @Override
     public void onEnable() {
     public void onEnable() {
-        long start = System.currentTimeMillis();
-        Logger.BOOT.log("This server is running MissileWars v" + version + " by Butzlabben");
-        if (VersionUtil.getVersion() < 8) {
-            Logger.WARN.log("====================================================");
-            Logger.WARN.log("It seems that you are using version older than 1.8");
-            Logger.WARN.log("There is no guarantee for this to work");
-            Logger.WARN.log("Proceed with extreme caution");
-            Logger.WARN.log("====================================================");
-        }
+        long startTime;
+        long endTime;
 
 
-        if (version.contains("beta")) {
-            Logger.WARN.log("NOTE: This is a beta version which means, that it may not be fully stable");
-        }
+        startTime = System.currentTimeMillis();
 
 
-        if (getDescription().getAuthors().size() > 1) {
-            StringBuilder sb = new StringBuilder();
-            for (String author : getDescription().getAuthors()) {
-                if (author.equals("Butzlabben"))
-                    continue;
-                sb.append(author);
-                sb.append(" ");
-            }
-            Logger.BOOT.log("Other authors: " + sb);
-        }
+        sendPluginInfo();
 
 
         Logger.BOOT.log("Loading properties...");
         Logger.BOOT.log("Loading properties...");
-        checkMaps();
+
+        // delete old missile wars temp-worlds from the last server session
+        deleteTempWorlds();
+
         Config.load();
         Config.load();
         MessageConfig.load();
         MessageConfig.load();
-        // I don't know why, and I don't want to know why, but this is needed to ensure the the messages are properly loaded at the first time
-        MessageConfig.load();
+        SetupUtil.checkMissiles();
+
         new File(Config.getArenaFolder()).mkdirs();
         new File(Config.getArenaFolder()).mkdirs();
         new File(Config.getLobbiesFolder()).mkdirs();
         new File(Config.getLobbiesFolder()).mkdirs();
 
 
@@ -112,8 +97,6 @@ public class MissileWars extends JavaPlugin {
         }
         }
         this.signRepository = repository;
         this.signRepository = repository;
 
 
-        checkMaps();
-
         Bukkit.getPluginManager().registerEvents(new PlayerListener(), this);
         Bukkit.getPluginManager().registerEvents(new PlayerListener(), this);
         Bukkit.getPluginManager().registerEvents(new ClickListener(), this);
         Bukkit.getPluginManager().registerEvents(new ClickListener(), this);
         Bukkit.getPluginManager().registerEvents(new ManageListener(), this);
         Bukkit.getPluginManager().registerEvents(new ManageListener(), this);
@@ -123,7 +106,6 @@ public class MissileWars extends JavaPlugin {
         framework.registerCommands(new MWCommands());
         framework.registerCommands(new MWCommands());
         framework.registerCommands(new StatsCommands());
         framework.registerCommands(new StatsCommands());
         framework.registerCommands(new UserCommands());
         framework.registerCommands(new UserCommands());
-        Logger.BOOTDONE.log("Registering commands");
 
 
         Arenas.load();
         Arenas.load();
         SetupUtil.checkShields();
         SetupUtil.checkShields();
@@ -132,6 +114,7 @@ public class MissileWars extends JavaPlugin {
 
 
         new Metrics(this, 3749);
         new Metrics(this, 3749);
 
 
+        // Check if FAWE is installed
         foundFAWE = Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null;
         foundFAWE = Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null;
 
 
         GameManager.getInstance().getGames().values().forEach(game -> {
         GameManager.getInstance().getGames().values().forEach(game -> {
@@ -149,26 +132,35 @@ public class MissileWars extends JavaPlugin {
             PreFetcher.preFetchPlayers(new StatsFetcher(new Date(0L), ""));
             PreFetcher.preFetchPlayers(new StatsFetcher(new Date(0L), ""));
         }
         }
 
 
-        long end = System.currentTimeMillis();
-        Logger.SUCCESS.log("MissileWars was enabled in " + (end - start) + "ms");
+        endTime = System.currentTimeMillis();
+        Logger.SUCCESS.log("MissileWars was enabled in " + (endTime - startTime) + "ms");
     }
     }
 
 
     @Override
     @Override
     public void onDisable() {
     public void onDisable() {
         GameManager.getInstance().disableAll();
         GameManager.getInstance().disableAll();
-        checkMaps();
+        deleteTempWorlds();
+
+        // TODO
         File missiles = new File(getDataFolder(), "missiles.zip");
         File missiles = new File(getDataFolder(), "missiles.zip");
         File arena = new File(getDataFolder(), "MissileWars-Arena.zip");
         File arena = new File(getDataFolder(), "MissileWars-Arena.zip");
         FileUtils.deleteQuietly(missiles);
         FileUtils.deleteQuietly(missiles);
         FileUtils.deleteQuietly(arena);
         FileUtils.deleteQuietly(arena);
+
         ConnectionHolder.close();
         ConnectionHolder.close();
     }
     }
 
 
+    /**
+     * @return true, if FAWE is installed
+     */
     public boolean foundFAWE() {
     public boolean foundFAWE() {
         return foundFAWE;
         return foundFAWE;
     }
     }
 
 
-    private void checkMaps() {
+    /**
+     * This methode delete the temp arena worlds of the MW game.
+     */
+    private void deleteTempWorlds() {
         File[] dirs = Bukkit.getWorldContainer().listFiles();
         File[] dirs = Bukkit.getWorldContainer().listFiles();
         for (File dir : dirs) {
         for (File dir : dirs) {
             if (dir.getName().startsWith("mw-")) {
             if (dir.getName().startsWith("mw-")) {
@@ -179,4 +171,36 @@ public class MissileWars extends JavaPlugin {
             }
             }
         }
         }
     }
     }
+
+    /**
+     * This methode send info about the version, version warnings (if needed) and the authors
+     * in the console.
+     */
+    private void sendPluginInfo() {
+
+        Logger.BOOT.log("This server is running MissileWars v" + version + " by Butzlabben");
+
+        if (VersionUtil.getVersion() < 8) {
+            Logger.WARN.log("====================================================");
+            Logger.WARN.log("It seems that you are using version older than 1.8");
+            Logger.WARN.log("There is no guarantee for this to work");
+            Logger.WARN.log("Proceed with extreme caution");
+            Logger.WARN.log("====================================================");
+        }
+
+        if (version.contains("beta")) {
+            Logger.WARN.log("NOTE: This is a beta version which means, that it may not be fully stable");
+        }
+
+        if (getDescription().getAuthors().size() > 1) {
+            StringBuilder sb = new StringBuilder();
+            for (String author : getDescription().getAuthors()) {
+                if (author.equals("Butzlabben"))
+                    continue;
+                sb.append(author);
+                sb.append(" ");
+            }
+            Logger.BOOT.log("Other authors: " + sb);
+        }
+    }
 }
 }

+ 2 - 1
missilewars-plugin/src/main/java/de/butzlabben/missilewars/listener/GameListener.java

@@ -315,17 +315,18 @@ public class GameListener extends GameBoundListener {
         }
         }
     }
     }
 
 
+    // TODO - Analyse, Ingame Check and Crop Cancel Analytic
     @EventHandler
     @EventHandler
     public void onClick(InventoryClickEvent event) {
     public void onClick(InventoryClickEvent event) {
         if (!(event.getWhoClicked() instanceof Player)) return;
         if (!(event.getWhoClicked() instanceof Player)) return;
         Player p = (Player) event.getWhoClicked();
         Player p = (Player) event.getWhoClicked();
         if (!isInGameWorld(p.getLocation())) return;
         if (!isInGameWorld(p.getLocation())) return;
+
         if (p.getGameMode() == GameMode.CREATIVE || p.isOp()) return;
         if (p.getGameMode() == GameMode.CREATIVE || p.isOp()) return;
         if (event.getSlotType() != InventoryType.SlotType.ARMOR) return;
         if (event.getSlotType() != InventoryType.SlotType.ARMOR) return;
         event.setCancelled(true);
         event.setCancelled(true);
     }
     }
 
 
-
     private boolean isInBetween(Vector point, Plane plane1, Plane plane2) {
     private boolean isInBetween(Vector point, Plane plane1, Plane plane2) {
         double distanceBetween = plane1.distanceSquared(plane2.getSupport());
         double distanceBetween = plane1.distanceSquared(plane2.getSupport());
         double distance1 = plane1.distanceSquared(point);
         double distance1 = plane1.distanceSquared(point);

+ 3 - 1
missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/SetupUtil.java

@@ -82,6 +82,8 @@ public class SetupUtil {
 
 
     public static void checkMissiles() {
     public static void checkMissiles() {
         File file = new File(MissileWars.getInstance().getDataFolder(), "missiles");
         File file = new File(MissileWars.getInstance().getDataFolder(), "missiles");
+
+        // check if the directory "/missiles" exists
         if (!file.isDirectory()) {
         if (!file.isDirectory()) {
             Logger.BOOT.log("Copying default missiles folder");
             Logger.BOOT.log("Copying default missiles folder");
 
 
@@ -90,7 +92,7 @@ public class SetupUtil {
             try {
             try {
                 copyZip(resource, file.getPath());
                 copyZip(resource, file.getPath());
             } catch (IOException e) {
             } catch (IOException e) {
-                Logger.ERROR.log("Unable to copy missiles");
+                Logger.ERROR.log("Unable to copy missiles!");
                 e.printStackTrace();
                 e.printStackTrace();
             }
             }
         }
         }

+ 1 - 2
missilewars-plugin/src/main/java/de/butzlabben/missilewars/wrapper/abstracts/arena/FallProtectionConfiguration.java

@@ -18,7 +18,6 @@
 
 
 package de.butzlabben.missilewars.wrapper.abstracts.arena;
 package de.butzlabben.missilewars.wrapper.abstracts.arena;
 
 
-
 import com.google.gson.annotations.SerializedName;
 import com.google.gson.annotations.SerializedName;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
@@ -31,5 +30,5 @@ public class FallProtectionConfiguration {
 
 
     private final boolean enabled = true;
     private final boolean enabled = true;
     private final int duration = 60;
     private final int duration = 60;
-    @SerializedName("message_only_on_start") private final boolean messageOnlyOnStart = false;
+    @SerializedName("message_only_on_start") private boolean messageOnlyOnStart = false;
 }
 }

+ 2 - 4
pom.xml

@@ -37,7 +37,7 @@
         <module>1_12</module>
         <module>1_12</module>
         <module>1_13_FAWE</module>
         <module>1_13_FAWE</module>
         <module>1_16_FAWE</module>
         <module>1_16_FAWE</module>
-        <module>MissileWars-Plugin</module>
+        <module>missilewars-plugin</module>
     </modules>
     </modules>
 
 
     <repositories>
     <repositories>
@@ -124,7 +124,6 @@
         </dependency>
         </dependency>
     </dependencies>
     </dependencies>
 
 
-
     <build>
     <build>
         <finalName>${project.artifactId}</finalName>
         <finalName>${project.artifactId}</finalName>
         <defaultGoal>package</defaultGoal>
         <defaultGoal>package</defaultGoal>
@@ -158,7 +157,6 @@
                     <relocations>
                     <relocations>
                         <relocation>
                         <relocation>
                             <pattern>org.bstats</pattern>
                             <pattern>org.bstats</pattern>
-                            <!-- Replace this with your package! -->
                             <shadedPattern>de.butzlabben.missilewars</shadedPattern>
                             <shadedPattern>de.butzlabben.missilewars</shadedPattern>
                         </relocation>
                         </relocation>
                     </relocations>
                     </relocations>
@@ -196,4 +194,4 @@
             </plugin>
             </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
-</project>
+</project>