Hello there, after messing with essentials, I realized to my dismay that their clear inventory doesn't clear armor slots. I thought I found a plugin that would work, but sadly, it doesn't. Could someone out there make a plugin that clears inventory and armor slots, and the default permissions is that a player can only clear his own inventory? Thanks, couljj
That's the plugin I was referring to. I have essentials and the two aren't compatible because they use the same command.
Is there any reason that the command refuses to work properly then? I type the command, and literally nothing happens. No error, at all. Not even an error in the console. It makes me think that the plugin isn't even on the server...
error with the plugin it self, possibly, the plugin is made by an essentials IRC helper, and was tested in bukkit + essentials server. paste startup log.
Code: 22.09 17:36:59 [Server] Startup Done (4.143s)! For help, type "help" or "?" 22.09 17:36:59 [Server] INFO Server permissions file permissions.yml is empty, ignoring it 22.09 17:36:59 [Server] INFO [AntiCheat] Enabling AntiCheat v1.3.6 22.09 17:36:59 [Server] INFO [EssentialsChat] Enabling EssentialsChat v2.9.3 22.09 17:36:59 [Server] INFO [PEXRank] Found PermissionsEx and ready to enable 22.09 17:36:59 [Server] INFO [PEXRank] Enabling PEXRank v1.3.1 22.09 17:36:59 [Server] INFO [EssentialsSpawn] Enabling EssentialsSpawn v2.9.3 22.09 17:36:58 [Server] INFO Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10] 22.09 17:36:58 [Multicraft] Skipped 12 lines due to rate limit (30/s) 22.09 17:36:58 [Server] INFO [WorldGuard] Loaded configuration for world 'world' 22.09 17:36:58 [Server] INFO [WorldGuard] (world) Fire spread is UNRESTRICTED. 22.09 17:36:58 [Server] INFO [WorldGuard] (world) Lava fire is blocked. 22.09 17:36:58 [Server] INFO [WorldGuard] (world) Lighters are PERMITTED. 22.09 17:36:58 [Server] INFO [WorldGuard] (world) TNT ignition is PERMITTED. 22.09 17:36:58 [Server] INFO [WorldGuard] Enabling WorldGuard v5.5.3 22.09 17:36:58 [Server] INFO [BetterClearInventory] **BetterClearInventory version 0.1 Beta has been enabled.** 22.09 17:36:58 [Server] INFO [BetterClearInventory] Enabling BetterClearInventory v0.1 Beta 22.09 17:36:58 [Server] INFO [MobBountyReloaded] build 282 enabled. 22.09 17:36:58 [Server] INFO [MobBountyReloaded] WorldGuard hooked. 22.09 17:36:58 [Server] INFO [MobBountyReloaded] mcMMO hooked. 22.09 17:36:58 [Server] INFO [MobBountyReloaded] Enabling MobBountyReloaded v282 22.09 17:36:58 [Server] INFO [InstaTNT] Enabling InstaTNT v0.1 22.09 17:36:58 [Server] INFO [CombatTag] has loaded with a tag time of 10 seconds 22.09 17:36:58 [Server] INFO [CombatTag] Enabling CombatTag v5.0 22.09 17:36:58 [Server] INFO [Commander] Enabled 22.09 17:36:58 [Server] INFO [Commander] Successfully imported 1 patterns from consolecmd.txt 22.09 17:36:58 [Server] INFO [Commander] Successfully imported 6 patterns from playerchat.txt 22.09 17:36:58 [Server] INFO [Commander] Successfully imported 7 patterns from playercmd.txt 22.09 17:36:58 [Server] INFO [Commander] Enabling Commander v1.2.3 22.09 17:36:58 [Server] INFO [Vault][Chat] PermissionsEx_Chat hooked. 22.09 17:36:58 [Server] INFO [Vault][Permission] PermissionsEx hooked. 22.09 17:36:58 [Server] INFO WEPIF: PermissionsEx detected! Using PermissionsEx for permissions. 22.09 17:36:58 [Server] INFO [PermissionsEx] v1.19.3 enabled 22.09 17:36:58 [Server] INFO [PermissionsEx] Superperms support enabled. 22.09 17:36:58 [Server] INFO [PermissionsEx] Enabling PermissionsEx v1.19.3 22.09 17:36:58 [Server] INFO [Buycraft] Plugin has been successfully enabled. 22.09 17:36:58 [Server] INFO [Buycraft] Loaded 2 package(s) into the cache. 22.09 17:36:57 [Server] INFO [Buycraft] Enabling Buycraft v4.7 22.09 17:36:57 [Server] INFO [MultiCommand] is enabled! 22.09 17:36:57 [Server] INFO [MultiCommand] You are running the lastest release: 2.0 22.09 17:36:56 [Server] INFO [MultiCommand] Using Vault! 22.09 17:36:56 [Server] INFO [MultiCommand] Enabling MultiCommand v2.0 22.09 17:36:56 [Server] INFO WEPIF: Using the Bukkit Permissions API. 22.09 17:36:56 [Server] INFO [WorldEdit] Enabling WorldEdit v5.4.2 22.09 17:36:56 [Server] INFO [ReadingRainbow] Enabling ReadingRainbow v0.1 22.09 17:36:56 [Server] INFO [NoDrops] Enabling NoDrops v0.3 22.09 17:36:56 [Server] INFO Preparing start region for level 1 (Seed: 3130890901445129214) 22.09 17:36:56 [Multicraft] Skipped 8 lines due to rate limit (30/s) 22.09 17:36:55 [Server] INFO [Vault][Chat] PermissionsEx found: Waiting 22.09 17:36:55 [Server] INFO [Vault][Permission] SuperPermissions loaded as backup permission system. 22.09 17:36:55 [Server] INFO [Vault][Permission] PermissionsEx found: Waiting 22.09 17:36:55 [Server] INFO [Vault][Economy] Essentials Economy found: Waiting 22.09 17:36:55 [Server] INFO [Vault] Enabling Vault v1.2.18-b229 22.09 17:36:55 [Server] INFO [AntiCheat] Loading AntiCheat v1.3.6 22.09 17:36:55 [Server] INFO [EssentialsChat] Loading EssentialsChat v2.9.3 22.09 17:36:55 [Server] INFO [PEXRank] Loading PEXRank v1.3.1 22.09 17:36:55 [Server] INFO [EssentialsSpawn] Loading EssentialsSpawn v2.9.3 22.09 17:36:55 [Server] INFO MLog clients using java 1.4+ standard logging. 22.09 17:36:55 [Server] INFO [EssentialsProtect] Loading EssentialsProtect v2.9.3 22.09 17:36:55 [Server] INFO [Essentials] Loading Essentials v2.9.3 22.09 17:36:55 [Server] INFO [WorldGuard] Loading WorldGuard v5.5.3 22.09 17:36:55 [Server] INFO [mcMMO] Loading mcMMO v1.3.11-b1030 22.09 17:36:55 [Server] INFO [BetterClearInventory] Loading BetterClearInventory v0.1 Beta 22.09 17:36:55 [Server] INFO [MobBountyReloaded] Loading MobBountyReloaded v282 22.09 17:36:55 [Server] INFO [InstaTNT] Loading InstaTNT v0.1 22.09 17:36:55 [Server] INFO [CombatTag] Loading CombatTag v5.0 22.09 17:36:55 [Server] INFO [Commander] Loading Commander v1.2.3 22.09 17:36:55 [Server] INFO [PermissionsEx] Initializing file backend 22.09 17:36:55 [Server] INFO [PermissionsEx] Loading PermissionsEx v1.19.3 22.09 17:36:55 [Server] INFO [Vault] Loading Vault v1.2.18-b229 22.09 17:36:55 [Server] INFO [Buycraft] Loading Buycraft v4.7 22.09 17:36:55 [Server] INFO [MultiCommand] Loading MultiCommand v2.0 22.09 17:36:55 [Server] INFO [WorldEdit] Loading WorldEdit v5.4.2 22.09 17:36:55 [Server] INFO [ReadingRainbow] Loading ReadingRainbow v0.1 22.09 17:36:55 [Server] INFO [NoDrops] Loading NoDrops v0.3 22.09 17:36:55 [Server] INFO [PermissionsEx] PermissionEx plugin initialized. 22.09 17:36:55 [Server] INFO [PermissionsEx] file backend registered! 22.09 17:36:55 [Server] INFO [PermissionsEx] sql backend registered! 22.09 17:36:54 [Server] INFO This server is running CraftBukkit version git-Bukkit-1.3.1-R2.0-b2340jnks (MC: 1.3.1) (Implementing API version 1.3.1-R2.0) 22.09 17:36:54 [Server] INFO Starting Minecraft server on 216.244.86.226:25570 22.09 17:36:54 [Server] INFO Generating keypair 22.09 17:36:54 [Server] INFO Default game type: SURVIVAL 22.09 17:36:54 [Server] INFO Loading properties 22.09 17:36:54 [Server] INFO Starting minecraft server version 1.3.1 22.09 17:36:53 [Server] INFO 27 achievements 22.09 17:36:53 [Server] INFO 195 recipes 22.09 17:36:53 [Multicraft] Loaded config for "Mod: Craftbukkit" 22.09 17:36:53 [Multicraft] Starting Minecraft! 22.09 17:36:53 [Multicraft] Loading Minecraft instance properties 22.09 17:36:52 [Multicraft] Received start command Just the log for BetterInventory Code: 22.09 17:36:58 [Server] INFO [BetterClearInventory] **BetterClearInventory version 0.1 Beta has been enabled.** 22.09 17:36:58 [Server] INFO [BetterClearInventory] Enabling BetterClearInventory v0.1 Beta /ci : Works but does not clear armor /ci -f : Doesn't work, doesn't register an error in the console or client.
hm, for a test, try open the essentials.jar with zip application, open plugin.yml, go to clearinventory command part, remove ci alias (make sure to not damage the file) if this works, il contact aaomidi.
This is literally like 10 lines of code, or less (+ imports and other stuff ofc) If no one does this once i wake up, ill do it. What do you want the command to be?
Right now, it's clearing the inventory, just not the armor. Tell me what I'm doing wrong: Code: package me.pogostick29.betterclearinventory; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin { public boolean onCommand (CommandSender sender, Command cmd, String commandLabel, String[] args) { if (!(sender instanceof Player)) { sender.sendMessage(ChatColor.RED + "The console doesn't have an inventory!"); return true; } Player p = (Player) sender; if (cmd.getName().equalsIgnoreCase("bci")) { p.getInventory().clear(); p.getInventory().setHelmet(new ItemStack (Material.AIR)); p.getInventory().setChestplate(new ItemStack (Material.AIR)); p.getInventory().setLeggings(new ItemStack (Material.AIR)); p.getInventory().setBoots(new ItemStack (Material.AIR)); p.sendMessage(ChatColor.GREEN + "Your inventory has been cleared!"); } return true; } }
Trying that now... EDIT: -_Husky_- and np98765 Nope, here's my code: Code: package me.pogostick29.betterclearinventory; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin { public boolean onCommand (CommandSender sender, Command cmd, String commandLabel, String[] args) { if (!(sender instanceof Player)) { sender.sendMessage(ChatColor.RED + "The console doesn't have an inventory!"); return true; } Player p = (Player) sender; if (cmd.getName().equalsIgnoreCase("bci")) { p.getInventory().clear(); p.getInventory().setHelmet(null); p.getInventory().setChestplate(null); p.getInventory().setLeggings(null); p.getInventory().setBoots(null); p.sendMessage(ChatColor.GREEN + "Your inventory has been cleared!"); } return true; } }
Just a ProTip If ur gonna be clearing the entire armor contents to one thing, use: setArmorContents instead of individually setting each piece. less code
Finished -- You can download it <Edit by Moderator: Redacted mediafire url> Any issues or feature requests, just shoot me a PM.
[quote uid=17954 name="np98765" post=1346244]Finished -- You can download it <Edit by Moderator: Redacted mediafire url> Any issues or feature requests, just shoot me a PM. [/quote] Thanks a lot, I'll be testing it out soon. What's the command though, that clears the inventory? Might be useful(;
For future reference, you can always right click the jarfile, open with an archive manager (like 7-ZIP or Win-rar) and look at the plugin.yml for all the commands, permission nodes, usages, descriptions, etc
Who needs to know the command?? The command is /cleareverything, but you can use /ce or even /clearall.
Very useful. Appreciate all you've done for me. xD Thanks, aha EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=17954 name="np98765" post=1346244]Finished -- You can download it <Edit by Moderator: Redacted mediafire url> Any issues or feature requests, just shoot me a PM. [/quote] Permission to decompile
This code I wrote only clears the inventory, not armor: Code: package me.pogostick29.betterclearinventory; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin { public boolean onCommand (CommandSender sender, Command cmd, String commandLabel, String[] args) { if (!(sender instanceof Player)) { sender.sendMessage(ChatColor.RED + "The console doesn't have an inventory!"); return true; } Player p = (Player) sender; if (cmd.getName().equalsIgnoreCase("bci")) { p.getInventory().clear(); p.getInventory().setHelmet(null); p.getInventory().setChestplate(null); p.getInventory().setLeggings(null); p.getInventory().setBoots(null); p.sendMessage(ChatColor.GREEN + "Your inventory has been cleared!"); } return true; } }