Browse Source

add multiple ip-addresses bypass permission

MasterCake 7 months ago
parent
commit
0eeb7bcf9f

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

@@ -325,7 +325,7 @@ public class Main extends JavaPlugin {
 			}
 		}
 		
-		if (!finalconfig.getBoolean("allow-multiple-accounts")) {
+		if (!finalconfig.getBoolean("allow-multiple-accounts") && !p.hasPermission("tim.multipleaccountsbypass")) {
 			int same_address_count = (int) Bukkit.getOnlinePlayers().stream().filter(player -> player.getAddress().getHostString().equals(p.getAddress().getHostString())).count();
 			if (same_address_count > finalconfig.getInt("max-multiple-accounts")) {
 				sendMessage(p, finalconfig.getString("message_multiple_ips"));

+ 1 - 0
Plugin/src/main/resources/config.yml

@@ -21,6 +21,7 @@ give_money_every_second: 600
 store-money-in-bank: false
 
 # Define if multiple accounts should get payed with the same ip-address. You may disable this if your players are using multiple accounts per ip.
+# Can also set "tim.multipleaccountsbypass" permission to bypass this for individual players.
 allow-multiple-accounts: true
 # Option to increase the maximal amount of players of the same IP getting a payout. Only applies when allow-multiple-accounts is set to false.
 max-multiple-accounts: 1