3 Commits bd4419291e ... ebcb91951f

Author SHA1 Message Date
  mastercake10 ebcb91951f increment minor version 4 months ago
  mastercake10 69d8bdfd99 uncommited change? 4 months ago
  mastercake10 1a512944e9 fix out of bounds exception 4 months ago

+ 2 - 2
Plugin/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 		<groupId>de.Linus122.TimeIsMoney</groupId>
 		<artifactId>parent</artifactId>
-		<version>1.9.11</version>
+		<version>1.9.12</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -121,7 +121,7 @@
 		<dependency>
 			<groupId>de.Linus122.TimeIsMoney</groupId>
 			<artifactId>Tools</artifactId>
-			<version>1.9.11</version>
+			<version>1.9.12</version>
 		</dependency>
         <dependency>
             <groupId>org.jetbrains</groupId>

+ 6 - 2
Plugin/src/main/java/de/Linus122/TimeIsMoney/Main.java

@@ -298,7 +298,9 @@ public class Main extends JavaPlugin {
 
 				// choose the last element of the payouts that does not have a custom timer
 				List<Payout> payoutsWithoutInterval = payouts_.stream().filter(payout -> payout.interval == 0).collect(Collectors.toList());
-				finalPayouts.add(payoutsWithoutInterval.get(payoutsWithoutInterval.size() - 1));
+				if (!payoutsWithoutInterval.isEmpty()) {
+					finalPayouts.add(payoutsWithoutInterval.get(payoutsWithoutInterval.size() - 1));
+				}
 				return finalPayouts;
 			} else if(this.getConfig().getBoolean("merge-payouts")) {
 				// Mering multiple payouts to one
@@ -360,7 +362,9 @@ public class Main extends JavaPlugin {
 		}
 
 		if (!finalconfig.getBoolean("allow-multiple-accounts") && !player.hasPermission("tim.multipleaccountsbypass")) {
-			Set<? extends Player> sameAddressPlayers = Bukkit.getOnlinePlayers().stream().filter(p -> p.getAddress().getHostString().equals(p.getAddress().getHostString())).collect(Collectors.toSet());
+			Set<? extends Player> sameAddressPlayers = Bukkit.getOnlinePlayers().stream()
+					.filter(p -> p.getAddress().getHostString().equals(p.getAddress().getHostString()))
+					.collect(Collectors.toSet());
 			int same_address_count = sameAddressPlayers.size();
 
 			if (same_address_count > finalconfig.getInt("max-multiple-accounts")) {

+ 1 - 0
Plugin/src/main/java/de/Linus122/TimeIsMoney/data/MySQLPluginData.java

@@ -123,6 +123,7 @@ public class MySQLPluginData extends PluginData{
                 playerData.getPayoutDataMap().put(payoutID, payoutData);
                 playerDataMap.put(uuid, playerData);
             }
+            return playerData;
         } catch (SQLException e) {
             e.printStackTrace();
         }

+ 1 - 1
Tools/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.11</version>
+        <version>1.9.12</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

+ 1 - 1
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>de.Linus122.TimeIsMoney</groupId>
     <artifactId>parent</artifactId>
-    <version>1.9.11</version>
+    <version>1.9.12</version>
     <name>TimeIsMoney</name>
     <url>https://www.spigotmc.org/resources/time-is-money.12409/</url>
     <packaging>pom</packaging>