mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-22 16:05:03 +00:00
Removed console error.
Removed silentChest message.
This commit is contained in:
parent
80ad1f971a
commit
5636cd26c1
7 changed files with 31 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = "";
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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: >
|
||||
|
|
Loading…
Reference in a new issue