mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 21:43:54 +00:00
Bug fixes (#92)
* Bug fixes - Now checks if nothing was ejected - Fix NPE in saconfig - Module_permbans now checks if you are an admin * Discord is better
This commit is contained in:
@ -27,6 +27,12 @@ public class Command_eject extends FreedomCommand
|
||||
names.add(entity.getName());
|
||||
}
|
||||
|
||||
if (names.isEmpty())
|
||||
{
|
||||
msg("Nothing was ejected.", ChatColor.GREEN);
|
||||
return true;
|
||||
}
|
||||
|
||||
msg("Ejecting " + StringUtils.join(names, ", ") + ".", ChatColor.GREEN);
|
||||
playerSender.eject();
|
||||
|
||||
|
@ -32,7 +32,6 @@ public class Command_saconfig extends FreedomCommand
|
||||
case "list":
|
||||
{
|
||||
msg("Admins: " + StringUtils.join(plugin.al.getAdminNames(), ", "), ChatColor.GOLD);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -154,6 +153,13 @@ public class Command_saconfig extends FreedomCommand
|
||||
|
||||
// Player already an admin?
|
||||
final Player player = getPlayer(args[1]);
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
msg(FreedomCommand.PLAYER_NOT_FOUND);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player != null && plugin.al.isAdmin(player))
|
||||
{
|
||||
msg("That player is already admin.");
|
||||
@ -176,7 +182,7 @@ public class Command_saconfig extends FreedomCommand
|
||||
{
|
||||
if (plugin.mbl.isMasterBuilderImpostor(player))
|
||||
{
|
||||
msg("This player was labeled as a Master Builder imposter and is not an admin, therefore they can not be added to the admin list.", ChatColor.RED);
|
||||
msg("This player was labeled as a Master Builder impostor and is not an admin, therefore they can not be added to the admin list.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
if (player == null)
|
||||
@ -296,5 +302,4 @@ public class Command_saconfig extends FreedomCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -17,6 +18,12 @@ public class Command_wipeflatlands extends FreedomCommand
|
||||
{
|
||||
plugin.sf.setSavedFlag("do_wipe_flatlands", true);
|
||||
|
||||
if (!ConfigEntry.FLATLANDS_GENERATE.getBoolean())
|
||||
{
|
||||
msg("Flatlands generation is disabled, therefore it cannot be wiped.");
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.bcastMsg("Server is going offline for flatlands wipe.", ChatColor.GRAY);
|
||||
|
||||
if (plugin.wgb.isPluginEnabled())
|
||||
|
Reference in New Issue
Block a user