sIgNifICanT buG FixEs (#105)

- Ignore totalfreedom.iml (people who clone from Git get this instead of TotalFreedomMod)
- Essentials check before running /denick
- Revise grammar in /invis
- WorldEdit check for /setl (since W/E is no longer a required dependency)
- WorldEdit check for /gtfo
- WorldEdit check for /unban
- Refactor -> LibsDisguiseBridge: isPluginEnabled -> isEnabled
- Remove unneccesary ChatColor in /wiperegions
- Use BlockData in Trailer
- Revise /wiewarps grammar
This commit is contained in:
Telesphoreo
2018-07-28 00:11:48 -07:00
committed by Seth
parent ed9200689c
commit 9c2f181ab9
24 changed files with 141 additions and 110 deletions

View File

@ -39,12 +39,9 @@ public class WorldGuardBridge extends FreedomService
try
{
final Plugin worldGuard = server.getPluginManager().getPlugin("WorldGuard");
if (worldGuard != null)
if (worldGuard != null && worldGuard instanceof WorldGuardPlugin)
{
if (worldGuard instanceof WorldGuardPlugin)
{
worldGuardPlugin = (WorldGuardPlugin) worldGuard;
}
worldGuardPlugin = (WorldGuardPlugin) worldGuard;
}
}
catch (Exception ex)
@ -72,9 +69,20 @@ public class WorldGuardBridge extends FreedomService
return false;
}
public boolean isPluginEnabled() {
Plugin wr = getWorldGuardPlugin();
return wr != null && wr.isEnabled();
public boolean isPluginEnabled()
{
try
{
WorldGuardPlugin wg = getWorldGuardPlugin();
if (wg != null)
{
return wg.isEnabled();
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return false;
}
}