Removed console error.

Removed silentChest message.
This commit is contained in:
lishid 2012-02-18 01:46:39 -05:00
parent 80ad1f971a
commit 5636cd26c1
7 changed files with 31 additions and 6 deletions

View file

@ -144,7 +144,7 @@ public class OpenInvPlayerListener implements Listener{
player.activeContainer = new SilentContainerChest(player.inventory, ((IInventory)chest));
player.activeContainer.windowId = id;
player.activeContainer.a((ICrafting)player);
event.getPlayer().sendMessage("You are opening a chest silently.");
//event.getPlayer().sendMessage("You are opening a chest silently.");
event.setUseInteractedBlock(Result.DENY);
event.setCancelled(true);
}

View file

@ -15,6 +15,11 @@ public class AnyChestPluginCommand implements CommandExecutor {
}
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player))
{
sender.sendMessage(ChatColor.RED + "You can't use this from the console.");
return true;
}
if (!PermissionRelay.hasPermission((Player) sender, "anychest")) {
sender.sendMessage(ChatColor.RED + "You do not have permission to use anychest.");
return true;

View file

@ -29,6 +29,11 @@ public class OpenInvPluginCommand implements CommandExecutor {
}
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player))
{
sender.sendMessage(ChatColor.RED + "You can't use this from the console.");
return true;
}
if (!PermissionRelay.hasPermission((Player)sender, "openinv")) {
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
return true;

View file

@ -17,10 +17,15 @@ public class SearchInvPluginCommand implements CommandExecutor {
}
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!PermissionRelay.hasPermission((Player) sender, "search")) {
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
return true;
}
if(sender instanceof Player)
{
if (!PermissionRelay.hasPermission((Player) sender, "search")) {
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
return true;
}
}
String PlayerList = "";

View file

@ -15,6 +15,11 @@ public class SilentChestPluginCommand implements CommandExecutor {
}
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player))
{
sender.sendMessage(ChatColor.RED + "You can't use this from the console.");
return true;
}
if (!PermissionRelay.hasPermission((Player) sender, "silent")) {
sender.sendMessage(ChatColor.RED + "You do not have permission to use silent chest.");
return true;

View file

@ -13,6 +13,11 @@ import org.bukkit.entity.Player;
public class ToggleOpenInvPluginCommand implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player))
{
sender.sendMessage(ChatColor.RED + "You can't use this from the console.");
return true;
}
if (!PermissionRelay.hasPermission((Player)sender, "openinv")) {
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
return true;

View file

@ -1,6 +1,6 @@
name: OpenInv
main: lishid.openinv.OpenInv
version: 1.7.5
version: 1.7.6
author: lishid
website: http://forums.bukkit.org/threads/15379/
description: >