Plugin category: Roleplay Suggested name: WhoIsThis A bit about me: I'm phtje, playing on a roleplay server named, "CraftHammer". We are using some plugins that makes the roleplay more fun, like heroes. What I want: Since we've got heroes installed, and being teired of typing /hero who <player>, we were thinking about a plugin that would let us right click a person and display his level and race, you could simply make an event right clicking a person and call /hero who <player>. Ideas for commands: No commands needed for this plugin, just a right click on the person. Ideas for permissions: Every player can use it. When I'd like it by: Soon, it shouldn't be hard, i hope? Similar plugin requests: None. Devs who might be interested in this: @LordKainzo , DThielke , Sleaker , jonDatz , Multitallented , @SolarflareFuG , @Archelinux, Rigby90 Very much thanks, -Phtje
This is what i found out, event.getPlayer() = player that right clicked event.getRightClicked() = entity that has been clicked Is somebody able to do it now? Also, Code: Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "/hero who <player>"); EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Well i'm bored, so I guess I could just write it. You want any Permission on it? 1st version: http://0x002a.de/Minecraft/Plugins/WhoIsThis/WhoIsThis.jar
No, everybody can use it. Thanks, soo much. I tried this myself, bukkti code changed and i failed so hard lol. Is it easy to update it?
yeah. Code: @EventHandler public void onPlayerInteractEntity(PlayerInteractEntityEvent event){ Entity entity = event.getRightClicked(); if(entity == null) return; if(!(entity instanceof Player)) return; Player clickedPlayer = (Player) entity; Player player = event.getPlayer(); Bukkit.dispatchCommand(player, "hero who " + clickedPlayer.getName()); } This is all the magic. Here the source with eclipse Project: WhoIsThis.zip