Developing a Minecraft game mode sounds awesome! You'll need to use the Bukkit API to execute Minecraft commands in JavaScript. You can clear an item using /clear <player> <item>. Check out this...