mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-23 00:15:08 +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 = new SilentContainerChest(player.inventory, ((IInventory)chest));
|
||||||
player.activeContainer.windowId = id;
|
player.activeContainer.windowId = id;
|
||||||
player.activeContainer.a((ICrafting)player);
|
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.setUseInteractedBlock(Result.DENY);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,11 @@ public class AnyChestPluginCommand implements CommandExecutor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
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")) {
|
if (!PermissionRelay.hasPermission((Player) sender, "anychest")) {
|
||||||
sender.sendMessage(ChatColor.RED + "You do not have permission to use anychest.");
|
sender.sendMessage(ChatColor.RED + "You do not have permission to use anychest.");
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -29,6 +29,11 @@ public class OpenInvPluginCommand implements CommandExecutor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
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")) {
|
if (!PermissionRelay.hasPermission((Player)sender, "openinv")) {
|
||||||
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
|
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -17,10 +17,15 @@ public class SearchInvPluginCommand implements CommandExecutor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
|
||||||
|
if(sender instanceof Player)
|
||||||
|
{
|
||||||
if (!PermissionRelay.hasPermission((Player) sender, "search")) {
|
if (!PermissionRelay.hasPermission((Player) sender, "search")) {
|
||||||
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
|
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String PlayerList = "";
|
String PlayerList = "";
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ public class SilentChestPluginCommand implements CommandExecutor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
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")) {
|
if (!PermissionRelay.hasPermission((Player) sender, "silent")) {
|
||||||
sender.sendMessage(ChatColor.RED + "You do not have permission to use silent chest.");
|
sender.sendMessage(ChatColor.RED + "You do not have permission to use silent chest.");
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -13,6 +13,11 @@ import org.bukkit.entity.Player;
|
||||||
public class ToggleOpenInvPluginCommand implements CommandExecutor {
|
public class ToggleOpenInvPluginCommand implements CommandExecutor {
|
||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
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")) {
|
if (!PermissionRelay.hasPermission((Player)sender, "openinv")) {
|
||||||
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
|
sender.sendMessage(ChatColor.RED + "You do not have permission to access player inventories");
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: OpenInv
|
name: OpenInv
|
||||||
main: lishid.openinv.OpenInv
|
main: lishid.openinv.OpenInv
|
||||||
version: 1.7.5
|
version: 1.7.6
|
||||||
author: lishid
|
author: lishid
|
||||||
website: http://forums.bukkit.org/threads/15379/
|
website: http://forums.bukkit.org/threads/15379/
|
||||||
description: >
|
description: >
|
||||||
|
|
Loading…
Reference in a new issue