mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Added /tban, colors for /rawsay, minor changes
This commit is contained in:
parent
48fe4f6e69
commit
36747cb986
@ -1,5 +1,5 @@
|
|||||||
#Thu, 09 May 2013 15:32:18 +0200
|
#Wed, 15 May 2013 14:55:52 +0200
|
||||||
|
|
||||||
program.VERSION=2.14
|
program.VERSION=2.14
|
||||||
program.BUILDNUM=182
|
program.BUILDNUM=186
|
||||||
program.BUILDDATE=05/09/2013 03\:32 PM
|
program.BUILDDATE=05/15/2013 02\:55 PM
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Thu May 09 15:32:18 CEST 2013
|
#Wed May 15 14:55:52 CEST 2013
|
||||||
build.number=183
|
build.number=187
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# TotalFreedomMod v2.13 Configuration
|
# TotalFreedomMod v2.14 Configuration
|
||||||
# by Madgeek1450 and DarthSalamon
|
# by Madgeek1450 and DarthSalamon
|
||||||
|
|
||||||
# Block placement prevention:
|
# Block placement prevention:
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE, block_host_console = true)
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, block_host_console = true)
|
||||||
@CommandParameters(description = "Manage permanently banned players and IPs.", usage = "/<command> <list | reload>")
|
@CommandParameters(description = "Manage permanently banned players and IPs.", usage = "/<command> <list | reload>")
|
||||||
public class Command_permban extends TFM_Command
|
public class Command_permban extends TFM_Command
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.plugin.Plugin;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Enable / disable plugins.", usage = "/<command> < <enable | disable> <pluginname> | list >")
|
@CommandParameters(description = "Enable / disable plugins.", usage = "/<command> < <enable | disable> <pluginname> | list >", aliases = "plc")
|
||||||
public class Command_plugincontrol extends TFM_Command
|
public class Command_plugincontrol extends TFM_Command
|
||||||
{
|
{
|
||||||
private enum CommandMode
|
private enum CommandMode
|
||||||
|
@ -2,12 +2,13 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE, block_host_console = true)
|
@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE, block_host_console = true)
|
||||||
@CommandParameters(description = "Broadcasts the given message with no extra formatting.", usage = "/<command> <message>")
|
@CommandParameters(description = "Broadcasts the given message. Supports colors.", usage = "/<command> <message>")
|
||||||
public class Command_rawsay extends TFM_Command
|
public class Command_rawsay extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -15,7 +16,7 @@ public class Command_rawsay extends TFM_Command
|
|||||||
{
|
{
|
||||||
if (args.length > 0)
|
if (args.length > 0)
|
||||||
{
|
{
|
||||||
TFM_Util.bcastMsg(StringUtils.join(args, " "));
|
TFM_Util.bcastMsg(ChatColor.translateAlternateColorCodes('&', StringUtils.join(args, " ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_ServerInterface;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||||
|
@CommandParameters(description = "Temporarily bans a player for five minutes.", usage = "/<command> <partialname>", aliases = "nope")
|
||||||
|
public class Command_tban extends TFM_Command {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
|
{
|
||||||
|
if (args.length != 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player p;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
p = getPlayer(args[0]);
|
||||||
|
}
|
||||||
|
catch (CantFindPlayerException ex)
|
||||||
|
{
|
||||||
|
playerMsg(ex.getMessage(), ChatColor.RED);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
TFM_Util.adminAction(sender.getName(), "NOPE: " + p.getName(), true);
|
||||||
|
TFM_ServerInterface.banUsername(p.getName(), ChatColor.RED + "You have been temporarily banned for 5 minutes",
|
||||||
|
sender.getName(), TFM_Util.parseDateOffset("5m"));
|
||||||
|
p.kickPlayer(ChatColor.RED + "NOPE!\nYou have been temporarily banned for five minutes.");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user