mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Added prelog
Fixed annoying commands More config junk
This commit is contained in:
parent
bb2e32519b
commit
3ba39d40c2
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,41 @@
|
||||
package me.StevenLawson.TotalFreedomMod;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerListener;
|
||||
|
||||
class TotalFreedomModPlayerListener extends PlayerListener
|
||||
{
|
||||
public static TotalFreedomMod plugin;
|
||||
|
||||
private static final Logger log = Logger.getLogger("Minecraft");
|
||||
|
||||
TotalFreedomModPlayerListener(TotalFreedomMod instance)
|
||||
{
|
||||
plugin = instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
String command = event.getMessage();
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (plugin.preprocessLogEnabled)
|
||||
{
|
||||
log.info(String.format("[PREPROCESS_COMMAND] %s(%s): %s", player.getName(), ChatColor.stripColor(player.getDisplayName()), command));
|
||||
}
|
||||
|
||||
if (command.startsWith("/stop") && !command.equals("/stop"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.RED + "Piss off.");
|
||||
}
|
||||
else if (command.startsWith("/zeus") || command.startsWith("/vulcan"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(ChatColor.RED + "Piss off.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: TotalFreedomMod
|
||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||
version: 1.3
|
||||
version: 1.4
|
||||
description: Plugin for the Total Freedom server
|
||||
author: StevenLawson / Madgeek1450
|
||||
commands:
|
||||
@ -37,6 +37,9 @@ commands:
|
||||
opme:
|
||||
description: Superadmin command - Automatically ops user.
|
||||
usage: /<command>
|
||||
prelog:
|
||||
description: Superadmin command - Enable/disable the command prelogger. When this is on, logs will be filled with many duplicate messages.
|
||||
usage: /<command> <on|off>
|
||||
qdeop:
|
||||
description: Quick De-Op - deop someone based on a partial name.
|
||||
usage: /<command> <partialname>
|
||||
|
Loading…
Reference in New Issue
Block a user