mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
Fix teams not being removed for ops if they were offline
also forgot to update the display of donators
This commit is contained in:
parent
d12a121300
commit
4a297a237c
@ -36,17 +36,24 @@ public class Command_donator extends FreedomCommand
|
||||
forum_id = args[4];
|
||||
}
|
||||
|
||||
PlayerData player = plugin.pl.getData(name);
|
||||
PlayerData data = plugin.pl.getData(name);
|
||||
|
||||
if (player == null)
|
||||
if (data == null)
|
||||
{
|
||||
player = plugin.pl.getDataByIp(ip);
|
||||
data = plugin.pl.getDataByIp(ip);
|
||||
}
|
||||
|
||||
if (data != null)
|
||||
{
|
||||
data.setDonator(mode);
|
||||
plugin.pl.save(data);
|
||||
}
|
||||
|
||||
Player player = getPlayer(name);
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
player.setDonator(mode);
|
||||
plugin.pl.save(player);
|
||||
plugin.rm.updateDisplay(player);
|
||||
}
|
||||
|
||||
if (forum_id != null && !forum_id.equals("0"))
|
||||
|
@ -5,6 +5,7 @@ import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -51,7 +52,7 @@ public class RankManager extends FreedomService
|
||||
}
|
||||
|
||||
// Developers always show up
|
||||
if (FUtil.DEVELOPERS.contains(player.getName()))
|
||||
if (FUtil.isDeveloper(player.getName()))
|
||||
{
|
||||
return Title.DEVELOPER;
|
||||
}
|
||||
@ -95,7 +96,7 @@ public class RankManager extends FreedomService
|
||||
}
|
||||
|
||||
// Developers always show up
|
||||
if (FUtil.DEVELOPERS.contains(admin.getName()))
|
||||
if (FUtil.isDeveloper(admin.getName()))
|
||||
{
|
||||
return Title.DEVELOPER;
|
||||
}
|
||||
@ -246,16 +247,15 @@ public class RankManager extends FreedomService
|
||||
return;
|
||||
}
|
||||
|
||||
// Set display
|
||||
if (isAdmin || FUtil.DEVELOPERS.contains(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator())
|
||||
// Broadcast login message
|
||||
if (isAdmin || FUtil.isDeveloper(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator())
|
||||
{
|
||||
final Displayable display = getDisplay(player);
|
||||
|
||||
FUtil.bcastMsg(craftLoginMessage(player, null));
|
||||
|
||||
updateDisplay(player);
|
||||
}
|
||||
|
||||
// Set display
|
||||
updateDisplay(player);
|
||||
|
||||
if (!plugin.pl.isPlayerImpostor(player) && target.hasVerification())
|
||||
{
|
||||
if (target.getTag() != null)
|
||||
|
@ -54,7 +54,7 @@ public class FUtil
|
||||
//
|
||||
public static final String SAVED_FLAGS_FILENAME = "savedflags.dat";
|
||||
// See https://github.com/TotalFreedom/License - None of the listed names may be removed.
|
||||
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "Wild1145", "aggelosQQ", "scripthead", "supernt");
|
||||
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "Wild1145", "aggelosQQ", "supernt");
|
||||
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
|
||||
public static final Map<String, ChatColor> CHAT_COLOR_NAMES = new HashMap<>();
|
||||
public static final List<ChatColor> CHAT_COLOR_POOL = Arrays.asList(
|
||||
|
Loading…
Reference in New Issue
Block a user