mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 12:36:41 +00:00
Block structure blocks from being placed
This commit is contained in:
@ -6,28 +6,36 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
|
||||
public class CommandSpy extends FreedomService {
|
||||
public class CommandSpy extends FreedomService
|
||||
{
|
||||
|
||||
public CommandSpy(TotalFreedomMod plugin) {
|
||||
public CommandSpy(TotalFreedomMod plugin)
|
||||
{
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
protected void onStart()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
protected void onStop()
|
||||
{
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||
if (plugin.al.isAdmin(event.getPlayer())) {
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (plugin.al.isAdmin(event.getPlayer()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (Player player : server.getOnlinePlayers()) {
|
||||
if (plugin.al.isAdmin(player) && plugin.pl.getPlayer(player).cmdspyEnabled()) {
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
if (plugin.al.isAdmin(player) && plugin.pl.getPlayer(player).cmdspyEnabled())
|
||||
{
|
||||
FUtil.playerMsg(player, event.getPlayer().getName() + ": " + event.getMessage());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user