public class Aa_mutecommand extends AbstractCommand
Modifier and Type | Field and Description |
---|---|
static boolean |
captureNextCommandSender
Determined whether we should capture the name
of the current class that calls sendMessage().
|
static boolean |
lastClassMuted
Determines whether the last class that called sendMessage()
was muted.
|
static int |
lastMuteTimestamp
Determines how long ago has the last command
that should be muted ran.
|
static LogFilter |
logFilter
This will hold a LogFilter that's used when we cannot run
instrumentation for any reason.
|
static java.lang.String |
newMutedClass
Stores a name for the class which called
a muted command.
|
static boolean |
readyToRetransform
Determines whether we're ready to start the instrumentation.
|
static boolean |
retransformationTried
Used to check whether we need to try to download the javassist
library, if it's not present.
|
static boolean |
retransformed
Determines whether we've re-transformed any classes yet.
|
Constructor and Description |
---|
Aa_mutecommand(org.bukkit.plugin.Plugin aa)
Constructor, takes AdminAnything as a parameter,
since we'll be needing it later to set up a delayed
task (as not to overload server by all the action :P).
|
Modifier and Type | Method and Description |
---|---|
static void |
checkIsClassMuted()
Checks whether the previously saved class name
should be muted and sets the internal variables
accordingly.
|
boolean |
onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
java.lang.String unused,
java.lang.String[] args)
/aa_muteCommand - mutes a command, so it won't broadcast any messaged to console or player chat
|
static void |
retransformCBMC()
Instruments CraftBukkit and Minecraft classes
to enable us cancelling out the sendMessage()
method calls from them as needed.
|
static void |
setCurrentClassMuted()
Sets previously saved class as one that should be muted.
|
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
transformations()
Prepares a map of transformable classes that we need to check for
on the server.
|
static void |
verifyMuteCheckTimeout()
Checks whether we're still within a timeout to mute
all commands that call sendMessage() and sets the internal
variables accordingly.
|
public static int lastMuteTimestamp
public static java.lang.String newMutedClass
public static boolean lastClassMuted
public static boolean captureNextCommandSender
public static boolean retransformed
public static boolean retransformationTried
public static boolean readyToRetransform
public static LogFilter logFilter
public Aa_mutecommand(org.bukkit.plugin.Plugin aa)
aa
- Instance of AdminAnything
.public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> transformations()
public static void checkIsClassMuted()
public static void verifyMuteCheckTimeout()
public static void setCurrentClassMuted()
public static void retransformCBMC()
public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, java.lang.String unused, java.lang.String[] args)
onCommand
in interface org.bukkit.command.CommandExecutor
onCommand
in class AbstractCommand
sender
- The player who is calling this command.cmd
- The actual command that is being executed.unused
- Name of the command which is being executed.args
- Any arguments passed to this command.