Browse Source

Fixing start interval

RedstoneFuture 2 years ago
parent
commit
9a699b2a06

+ 11 - 11
missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/PlayerEquipmentRandomizer.java

@@ -73,7 +73,7 @@ public class PlayerEquipmentRandomizer {
      * randomizer.
      */
     public void resetPlayerInterval() {
-        setPlayerInterval(getStartInterval());
+        setPlayerInterval(getStartInterval() + 1);
     }
 
     /**
@@ -87,6 +87,16 @@ public class PlayerEquipmentRandomizer {
         mwPlayer.getPlayer().setLevel(playerInterval);
     }
 
+    /**
+     * This method returns the interval after the player receives a new
+     * item at game start.
+     *
+     * @return (int) the interval in seconds
+     */
+    private int getStartInterval() {
+        return arena.getInterval().getStart();
+    }
+
     /**
      * This method gives the player a random item of one of the two
      * game equipment lists. The two lists alternate: after two
@@ -121,16 +131,6 @@ public class PlayerEquipmentRandomizer {
         sendEquipmentCounter++;
     }
 
-    /**
-     * This method returns the interval after the player receives a new
-     * item at game start.
-     *
-     * @return (int) the interval in seconds
-     */
-    private int getStartInterval() {
-        return arena.getInterval().getStart() + 1;
-    }
-
     /**
      * This method returns the interval after the player receives a new
      * item during the game. It depends on the current team size and the