Easy Plugin

Discussion in 'Archived: Plugin Requests' started by blackicetf2, Jun 14, 2013.

  1. Offline

    blackicetf2

    Plugin category: Fun

    Suggested name: RandomPowerups

    What I want:
    Make item 104 shoot lightning
    Blaze-rod shoot fireball
    Feather make you fly for 5 seconds
    Sugar give you speed II for 10 seconds

    To use any of those items they must right click the item.

    Ideas for commands: A command to receive the items. <-- Not really needed

    Ideas for permissions: Everyone should have them by default.

    When I'd like it by: 2 days till now. [6/16/2013]
     
  2. Offline

    Pilgrims007

    I can make this but when u use the item do you want the item to be removed from the inventory?
     
  3. Offline

    Kaperly

    I am already working on this plugin, I am very sorry but if you don't mind, I would prefer for my code not to go to waste.
     
  4. Offline

    TheComputerDewd

    Well, the first two can be done with current plugins.
    -Make item 104 shoot lightning
    -Blaze-rod shoot fireball

    /powertool Lightning (Essentials)
    /powertool fireball (Essentials)

    But if you wanted to give this to all users, then a dev would be needed.
     
  5. Offline

    Pilgrims007

    Perhaps I can help if you need
     
  6. Offline

    Kaperly

    I am good, it is not very hard. Thanks for the offer though.
     
  7. Offline

    themightyduff

    It's not exactly a whole lot of code tho :D under 150 lines I would say.
     
  8. Offline

    Pilgrims007

    under 100 I would think if its compact
     
  9. Offline

    Kaperly

    I am three fourths of the way done and only on line 49. I think I could do it in under 70.

    Right now I have everything but the fly working fine. Would you like the items to be removed from your inventory after you use them? (Pilgrims007's idea)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  10. Offline

    BENCLABSTER

    This plugin would actually be very simple. My first plugin about 6 months ago was just like it. for an item use this:
    Code:java
    1. @Override
    2. public boolean onCommand(CommandSender sender, Command command,
    3. String label, String[] args) {
    4. Player player = (Player) sender;
    5. if(label.equalsIgnoreCase("FireWand")) {
    6. if(player.hasPermission("wand.fire")) {
    7. ItemStack fire = new ItemStack(Material.BLAZE_ROD);
    8. ItemMeta fm = fire.getItemMeta();
    9. fm.setDisplayName(ChatColor.GOLD + "Fire Wand");
    10. fire.setItemMeta(fm);
    11. player.getInventory().addItem(fire);
    12. }

    Code:java
    1. @EventHandler
    2. public void PlayerInteract(PlayerInteractEvent event) {
    3. if ((event.getAction() == Action.RIGHT_CLICK_AIR)) {
    4. Player player = event.getPlayer();
    5. if(player.getItemInHand().getItemMeta().getDisplayName().equals(ChatColor.GOLD + "Fire Wand")) {
    6. player.launchProjectile(Fireball.class);
    7. }
    8. }

    Im sure you could build off of that, not going to provide everything so you can still learn :)

    as for this, watch this video and toggle the player's fly mode for 5 seconds

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  11. Offline

    Kaperly

    Plugin has been finished for a bit now. I am waiting for the file to be approved then I will post the link to the plugin page.
     
  12. Offline

    blackicetf2

    Yes I would like it to be removed from the inventory ! and awesome !
     
  13. Offline

    Kaperly

  14. Offline

    RingOfStorms

    You should post on the forum saying you're working on it when you start it. No reason not to, and saying no you can't make it to someone who posted before you is a bit unfair.
     
  15. Offline

    Kaperly

    I did not really know what else to say. I know I should have posted saying I was working on the plugin but when I saw that reply I was already half way done. The plugin is done now and I will definitely remember to post before I start working on a plugin if I do any more requests.

    Sorry if I offended anyone.
     
  16. Offline

    AwesomeMarioFan

Share This Page