Fixing whitelist ip and uuid checking

This commit is contained in:
Dawson Hessler
2022-07-10 12:59:45 -04:00
parent db49d400a0
commit e01cbf95f2
3 changed files with 15 additions and 4 deletions
@@ -84,6 +84,12 @@ public class BukkitListener extends VPNExecutor implements Listener {
// If the countryList() size is zero, no need to check.
// Running country check first
if(AntiVPN.getInstance().getVpnConfig().countryList().size() > 0
&& !(AntiVPN.getInstance().getExecutor()
.isWhitelisted(event.getPlayer().getUniqueId()) //Is exempt
//Or has a name that starts with a certain prefix. This is for Bedrock exempting.
|| AntiVPN.getInstance().getExecutor().isWhitelisted(event.getPlayer()
.getAddress().getAddress()
.getHostAddress()))
// This bit of code will decide whether or not to kick the player
// If it contains the code and it is set to whitelist, it will not kick as they are equal
// and vise versa. However, if the contains does not match the state, it will kick.