Even more 1.13 things

This commit is contained in:
ZeroEpoch1969
2018-07-25 22:22:19 -07:00
parent 3c46df0082
commit 551a0b2317
4 changed files with 21 additions and 6 deletions

View File

@ -36,6 +36,7 @@ public class GameRuleHandler extends FreedomService
setGameRule(GameRule.COMMAND_BLOCK_OUTPUT, false);
setGameRule(GameRule.NATURAL_REGENERATION, true, false);
setGameRule(GameRule.KEEP_INVENTORY, true, false);
setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false, false);
commitGameRules();
}
@ -94,7 +95,8 @@ public class GameRuleHandler extends FreedomService
DO_TILE_DROPS("doTileDrops", true),
COMMAND_BLOCK_OUTPUT("commandBlockOutput", true),
NATURAL_REGENERATION("naturalRegeneration", true),
DO_DAYLIGHT_CYCLE("doDaylightCycle", true);
DO_DAYLIGHT_CYCLE("doDaylightCycle", true),
ANNOUNCE_ADVANCEMENTS("announceAdvancements", false);
//
private final String gameRuleName;
private final boolean defaultValue;

View File

@ -142,10 +142,15 @@ public class Command_myadmin extends FreedomCommand
}
String msg = StringUtils.join(args, " ", 1, args.length);
if (!msg.contains("%name%"))
{
msg("You login message must contain your name. To add it, specify %name% where you want it.", ChatColor.RED);
return true;
}
FUtil.adminAction(sender.getName(), "Setting personal login message" + (init == null ? "" : " for " + targetPlayer.getName()), false);
target.setLoginMessage(msg);
msg((init == null ? "Your" : targetPlayer.getName() + "'s") + " login message is now: ");
msg("> " + ChatColor.AQUA + targetPlayer.getName() + " is " + ChatUtils.colorize(target.getLoginMessage()));
msg("> " + FUtil.colorize(msg).replace("%name%", targetPlayer.getName()));
plugin.al.save();
plugin.al.updateTables();
return true;

View File

@ -175,7 +175,15 @@ public class RankManager extends FreedomService
FUtil.bcastMsg(ChatColor.AQUA + player.getName() + " is " + Rank.IMPOSTOR.getColoredLoginMessage());
if (plugin.al.isAdminImpostor(player))
{
FUtil.bcastMsg("Warning: " + player.getName() + " has been flagged as an impostor and has been frozen!", ChatColor.RED);
FUtil.bcastMsg("Warning: " + player.getName() + " has been flagged as an admin impostor and has been frozen!", ChatColor.RED);
}
else if (plugin.mbl.isMasterBuilderImpostor(player))
{
FUtil.bcastMsg("Warning: " + player.getName() + " has been flagged as a Master Builder impostor and has been frozen!", ChatColor.RED);
}
else if (plugin.pv.isPlayerImpostor(player))
{
FUtil.bcastMsg("Warning: " + player.getName() + " has been flagged as a player impostor and has been frozen!", ChatColor.RED);
}
String displayName = Rank.IMPOSTOR.getColor() + player.getName();
player.setPlayerListName(StringUtils.substring(displayName, 0, 16));
@ -202,7 +210,7 @@ public class RankManager extends FreedomService
}
}
FUtil.bcastMsg(ChatColor.AQUA + player.getName() + " is " + loginMsg);
FUtil.bcastMsg(loginMsg.replace("%name%", player.getName()));
plugin.pl.getPlayer(player).setTag(display.getColoredTag());
if (isAdmin)