@@ -40,12 +40,18 @@ public class SearchInvCommand implements TabExecutor {
 | 
			
		||||
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
 | 
			
		||||
 | 
			
		||||
        Material material = null;
 | 
			
		||||
        int count = 1;
 | 
			
		||||
 | 
			
		||||
        if (args.length >= 1) {
 | 
			
		||||
            material = Material.getMaterial(args[0].toUpperCase());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (material == null) {
 | 
			
		||||
            plugin.sendMessage(sender, "messages.error.invalidMaterial", "%target%", args.length > 0 ? args[0] : "null");
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        int count = 1;
 | 
			
		||||
 | 
			
		||||
        if (args.length >= 2) {
 | 
			
		||||
            try {
 | 
			
		||||
                count = Integer.parseInt(args[1]);
 | 
			
		||||
@@ -55,11 +61,6 @@ public class SearchInvCommand implements TabExecutor {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (material == null) {
 | 
			
		||||
            plugin.sendMessage(sender, "messages.error.invalidMaterial", "%target%", args[0]);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        StringBuilder players = new StringBuilder();
 | 
			
		||||
        boolean searchInv = command.getName().equals("searchinv");
 | 
			
		||||
        for (Player player : plugin.getServer().getOnlinePlayers()) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user