Many changes for TFM 5.0

Refractoring
Reworked /saconfig
Reworked part of the command system
Removed unused config sections
Refractored part of the config
Fixed bugs with admin list
Actually allow CONSOLE to have senior perms
This commit is contained in:
JeromSar
2016-03-02 20:28:01 +01:00
parent 19ced05110
commit 055973aa37
143 changed files with 939 additions and 954 deletions

View File

@ -12,9 +12,6 @@ import org.bukkit.plugin.Plugin;
public class WorldEditBridge extends FreedomService
{
private static WorldEditPlugin worldEditPlugin = null;
public WorldEditBridge(TotalFreedomMod plugin)
{
super(plugin);
@ -32,59 +29,63 @@ public class WorldEditBridge extends FreedomService
private WorldEditPlugin getWorldEditPlugin()
{
if (worldEditPlugin == null)
WorldEditPlugin worldEditPlugin = null;
try
{
try
Plugin we = Bukkit.getServer().getPluginManager().getPlugin("WorldEdit");
if (we != null)
{
Plugin we = Bukkit.getServer().getPluginManager().getPlugin("WorldEdit");
if (we != null)
if (we instanceof WorldEditPlugin)
{
if (we instanceof WorldEditPlugin)
{
worldEditPlugin = (WorldEditPlugin) we;
}
worldEditPlugin = (WorldEditPlugin) we;
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return worldEditPlugin;
}
private LocalSession getPlayerSession(Player player)
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep == null)
{
return null;
}
try
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep != null)
{
return wep.getSession(player);
}
return wep.getSession(player);
}
catch (Exception ex)
{
FLog.severe(ex);
return null;
}
return null;
}
private BukkitPlayer getBukkitPlayer(Player player)
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep == null)
{
return null;
}
try
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep != null)
{
return wep.wrapPlayer(player);
}
return wep.wrapPlayer(player);
}
catch (Exception ex)
{
FLog.severe(ex);
return null;
}
return null;
}
public void undo(Player player, int count)