[WIP / DO NOT USE ON PRODUCTION!!] Begin implementing support for SuperVanish and fix bugs

- Update dependencies in pom.xml
- Replace TotalFreedomMod's vanish system with SuperVanish. It's widely supported by many major plugins and does a better job vanishing players
- Fixed a typo in the SQL command for creating admin tables, where the table would not be created on a clean install of TFM
- Update bStats Metrics to latest version
- Remove the VanishHandler
- Sync the permissions.yml from whats on the server. Entries for Essentials and SuperVanish will be added soon

KNOWN BUG:
- Plugins override TFM commands (e.g. Essentials takes over /list instead of giving it to TFM). I noticed that there is a semicolon before every TFM command. (:/ban, :/list), which is the actual TFM command. I have no idea where / how this bug came from. Urgently needs to be fixed.
This commit is contained in:
2020-08-04 01:31:26 -05:00
parent e1b514ca85
commit 4555a7e3f2
25 changed files with 297 additions and 378 deletions

View File

@ -2,6 +2,7 @@ package me.totalfreedom.totalfreedommod.admin;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import de.myzelyam.api.vanish.VanishAPI;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
@ -19,6 +20,7 @@ import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.metadata.MetadataValue;
public class AdminList extends FreedomService
{
@ -31,7 +33,6 @@ public class AdminList extends FreedomService
private final Map<String, Admin> ipTable = Maps.newHashMap();
public final List<String> verifiedNoAdmins = new ArrayList<>();
public final Map<String, List<String>> verifiedNoAdminIps = Maps.newHashMap();
public static List<String> vanished = new ArrayList<>();
@Override
public void onStart()
@ -363,8 +364,8 @@ public class AdminList extends FreedomService
updateTables();
}
public boolean isVanished(String player)
public boolean isVanished(Player player)
{
return vanished.contains(player);
return VanishAPI.isInvisible(player);
}
}