mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +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;
|
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;
|
import org.bukkit.event.player.PlayerListener;
|
||||||
|
|
||||||
class TotalFreedomModPlayerListener extends PlayerListener
|
class TotalFreedomModPlayerListener extends PlayerListener
|
||||||
{
|
{
|
||||||
public static TotalFreedomMod plugin;
|
public static TotalFreedomMod plugin;
|
||||||
|
private static final Logger log = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
TotalFreedomModPlayerListener(TotalFreedomMod instance)
|
TotalFreedomModPlayerListener(TotalFreedomMod instance)
|
||||||
{
|
{
|
||||||
plugin = 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
|
name: TotalFreedomMod
|
||||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||||
version: 1.3
|
version: 1.4
|
||||||
description: Plugin for the Total Freedom server
|
description: Plugin for the Total Freedom server
|
||||||
author: StevenLawson / Madgeek1450
|
author: StevenLawson / Madgeek1450
|
||||||
commands:
|
commands:
|
||||||
@ -37,6 +37,9 @@ commands:
|
|||||||
opme:
|
opme:
|
||||||
description: Superadmin command - Automatically ops user.
|
description: Superadmin command - Automatically ops user.
|
||||||
usage: /<command>
|
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:
|
qdeop:
|
||||||
description: Quick De-Op - deop someone based on a partial name.
|
description: Quick De-Op - deop someone based on a partial name.
|
||||||
usage: /<command> <partialname>
|
usage: /<command> <partialname>
|
||||||
|
Loading…
Reference in New Issue
Block a user