Some restrictions and something should of added a while ago

This commit is contained in:
ZeroEpoch1969 2018-07-22 12:57:18 -07:00
parent 0c702ee967
commit bfefebe480
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
5 changed files with 34 additions and 7 deletions

View File

@ -225,9 +225,10 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
btb = bridges.registerService(BukkitTelnetBridge.class);
cpb = bridges.registerService(CoreProtectBridge.class);
esb = bridges.registerService(EssentialsBridge.class);
ldb = bridges.registerService(LibsDisguisesBridge.class);
web = bridges.registerService(WorldEditBridge.class);
wgb = bridges.registerService(WorldGuardBridge.class);
// Disabled so I can at least load TFM as these plugins aren't updated
//ldb = bridges.registerService(LibsDisguisesBridge.class);
//web = bridges.registerService(WorldEditBridge.class);
//wgb = bridges.registerService(WorldGuardBridge.class);
amp = bridges.registerService(AMP.class);
bridges.start();

View File

@ -113,6 +113,17 @@ public class AdminList extends FreedomService
config.save();
}
public void messageAllAdmins(String message)
{
for (Player player : server.getOnlinePlayers())
{
if (isAdmin(player))
{
player.sendMessage(message);
}
}
}
public synchronized boolean isAdminSync(CommandSender sender)
{
return isAdmin(sender);

View File

@ -8,7 +8,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Warns a player.", usage = "/<command> <player> <reason>")
public class Command_warn extends FreedomCommand
{
@ -48,6 +48,16 @@ public class Command_warn extends FreedomCommand
msg(player, ChatColor.RED + "[WARNING] You received a warning: " + warnReason);
msg(ChatColor.GREEN + "You have successfully warned " + player.getName());
final StringBuilder adminNotice = new StringBuilder()
.append(ChatColor.RED)
.append(sender.getName())
.append(" - ")
.append("Warning: ")
.append(player.getName())
.append(" - Reason: ")
.append(ChatColor.YELLOW)
.append(warnReason);
plugin.al.messageAllAdmins(adminNotice.toString());
plugin.pl.getPlayer(player).incrementWarnings();

View File

@ -140,8 +140,11 @@ blocked_commands:
- 'n:b:/pp hugeexplosion:You may not use this particle! Please use another.'
- 'n:b:/pp barrier:You may not use this particle! Please use another.'
- 'n:b:/setjail:_'
- 'n:b:/tfbanlist:Use /banlist to see and wipe the ban list'
- 'n:b:/tfipbanlist:Use /banlist to see and wipe the ban list'
- 'n:b:/function:_'
- 'n:b:/defaultgamemode:_'
- 'n:b:/data:_'
- 'n:b:/datapack:_'
- 'n:b:/tag:_'
# Superadmin commands
- 's:b:/save-all:_'
@ -180,6 +183,8 @@ blocked_commands:
- 's:b:/togglejail:_'
- 's:b:/fill:_'
- 's:b:/flood:_'
- 's:b:/team:_'
- 'n:b:/bossbar:_'
# Superadmin commands - Auto-eject
- 's:a:/stop:_'

View File

@ -2,7 +2,7 @@ name: TotalFreedomMod
main: me.totalfreedom.totalfreedommod.TotalFreedomMod
version: ${tfm.build.version}
description: Plugin for the Total Freedom server.
depend: [Aero, WorldEdit]
depend: [Aero]
softdepend: [BukkitTelnet, Essentials, LibsDisguises]
authors: [Madgeek1450, Prozza]