Slimes

Discussion in 'Plugin Development' started by Cooper PluginDev, Mar 18, 2014.

Thread Status:
Not open for further replies.
  1. How do I change this into a large slime?
    Like when I morph into it, it makes me a small slime? How do I change it to a large one?
    Code:
    Code:java
    1. Morphs.morph(p, DisguiseType.Slime);
    2.  
     
  2. Offline

    Minesuchtiiii

    something with setAge()
     
  3. Offline

    StealerSlain

    There is no something with BIG_SLIME, SLIMEZILLA and etc.?
     
  4. StealerSlain Minesuchtiiii
    ? me no understand lol.

    Anyone?

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

    Barinade

  6. Barinade
    can't get it working. Explain it to me please?
    Code:
    Code:java
    1. Morphs.morph(p, DisguiseType.Slime) void setSize(1);
     
  7. Offline

    Barinade

    it'll probably be in the morph method
     
  8. Barinade
    You don't know what you're doing do you lol?.

    Bumpio
     
  9. Offline

    Barinade

    Nope, not at all. Never made a plugin before in my life.
     
  10. Barinade
    Then explain to me what I do?
     
  11. Offline

    Barinade

    Show me the morph method?
     
  12. Barinade
    Code:java
    1. else if ((args[0].equalsIgnoreCase("slime")) && (sender.hasPermission("morph.slime"))) {
    2.  
    3. isCowMorph.remove(p.getName());
    4. isSpiderMorph.remove(p.getName());
    5. isGolemMorph.remove(p.getName());
    6.  
    7. if(!(isSpiderMorph.contains(p.getName()))) {
    8. Morphs.unmorph(p);
    9. setMetadata(p, "morphtype", "none", this);
    10. p.removePotionEffect(PotionEffectType.JUMP);
    11. p.removePotionEffect(PotionEffectType.REGENERATION);
    12. p.removePotionEffect(PotionEffectType.ABSORPTION);
    13. p.removePotionEffect(PotionEffectType.SPEED);
    14. p.removePotionEffect(PotionEffectType.SLOW);
    15. p.removePotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
    16. }
    17. if(!(isCowMorph.contains(p.getName()))) {
    18. Morphs.unmorph(p);
    19. setMetadata(p, "morphtype", "none", this);
    20. p.removePotionEffect(PotionEffectType.JUMP);
    21. p.removePotionEffect(PotionEffectType.REGENERATION);
    22. p.removePotionEffect(PotionEffectType.ABSORPTION);
    23. p.removePotionEffect(PotionEffectType.SPEED);
    24. p.removePotionEffect(PotionEffectType.SLOW);
    25. p.removePotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
    26. }
    27. if(!(isGolemMorph.contains(p.getName()))) {
    28. Morphs.unmorph(p);
    29. setMetadata(p, "morphtype", "none", this);
    30. p.removePotionEffect(PotionEffectType.JUMP);
    31. p.removePotionEffect(PotionEffectType.REGENERATION);
    32. p.removePotionEffect(PotionEffectType.ABSORPTION);
    33. p.removePotionEffect(PotionEffectType.SPEED);
    34. p.removePotionEffect(PotionEffectType.SLOW);
    35. p.removePotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
    36. }
    37.  
    38. isSlimeMorph.add(p.getName());
    39. sender.sendMessage(ChatColor.BLUE + "Morphs> " + ChatColor.GRAY + "You are no longer morphed.");
    40.  
    41.  
    42. ItemStack slimeball = new ItemStack(Material.SLIME_BALL);
    43. if (!((MetadataValue)p.getMetadata("morphtype").get(0)).asString().equals("slime")) {
    44. p.playSound(p.getLocation(), Sound.SLIME_WALK2, 5.0F, 10.0F);
    45. setMetadata(p, "morphtype", "slime", this);
    46. Morphs.morph(p, DisguiseType.Slime);
    47. ItemMeta im = slimeball.getItemMeta();
    48. im.setDisplayName(ChatColor.GOLD + "Slime Goo");
    49. List lore = Arrays.asList(new String[] { ChatColor.GRAY + "Damage: " + ChatColor.YELLOW + "4", ChatColor.GRAY + "Ability: " + ChatColor.BLUE + "[SLIME GOO] " + ChatColor.YELLOW + "Elastic Slingshot " + ChatColor.BLUE + "[FIST] " + "Unstable Matter", ChatColor.GRAY + "Knockback: " + ChatColor.YELLOW + "0%"});
    50. im.setLore(lore);
    51. slimeball.setItemMeta(im);
    52. p.getInventory().addItem(slimeball);
    53. sender.sendMessage(ChatColor.BLUE + "Morphs> " + ChatColor.GRAY + "You have morphed as a " + ChatColor.RED + "Slime" + ChatColor.GRAY + ".");
    54. sender.sendMessage(ChatColor.BLUE + "Morphs> " + ChatColor.GRAY + "Type " + ChatColor.GREEN + "/morph cancel " + ChatColor.GRAY + "to unmorph." );
    55. p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 999999, 4));
    56. p.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 999999, 0));
    57. p.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 99999, 10));
    58. } else {
    59. sender.sendMessage(ChatColor.BLUE + "Morphs> " + ChatColor.GRAY + "You are already morphed, type /morph cancel to unmorph.");
    60. }
    61. }
     
  13. Offline

    Barinade

    You're not getting it. Never mind, someone else can help you.
    If you gather the mental capacity to get me the information I requested I will gladly help you.

    Decided to do your job for you
    public Disguise(int entityID, String data, DisguiseType type)


    if (data.contains("tiny")) {
    mWatch(16, (byte) 1);
    } else if (data.contains("small")) {
    mWatch(16, (byte) 2);
    } else if (data.contains("big")) {
    mWatch(16, (byte) 4);
    } else if (data.contains("bigger")) {
    mWatch(16, (byte) DisguiseCraft.pluginSettings.biggerCube);
    } else if (data.contains("massive")) {
    mWatch(16, (byte) DisguiseCraft.pluginSettings.massiveCube);
    } else if (data.contains("godzilla")) {
    mWatch(16, (byte) DisguiseCraft.pluginSettings.godzillaCube);
    }
     
  14. Still having trouble :/
    I dont' want to check if it's a type of slime, I want to set it to a type of slime.

    Anyone?

    bumpio
     
  15. Offline

    Prophix

    Cooper No one is going to help you if you don't even try to use the code. Maybe you wouldn't need as much help if you actually tried to fix all those GroundWar plugins you were given (i.e. the ClansPlugin "you made") other than just asking people here to fix it for you.

    Love from,
    Person from BattleAU/Seaminecraft community
     
    Loogeh likes this.
  16. Barinade It's quite obvious that he's new at this...

    Cooper PluginDev I would strongly recommend you learn some more about Java before trying to create plugins. And I would definitely learn more before trying to say that somebody else doesn't know what they're doing because, honestly, it's makes you look like a bit of a hypocrite. And I have to admit, it's a little bit amusing. :)
     
  17. Offline

    Barinade

    This is the last time, dude. I've literally spoon fed you to this point. I've given you every bit of information you need, even after you insulted me.

    My last post gave you the constructor to use
    public Disguise(int entityID, String data, DisguiseType type)

    And the possible "data" to replace the string

    tiny/small/big/bigger/massive/godzilla

    To set the size of a slime, use this line
    dcAPI.disguisePlayer(player, new Disguise(dcAPI.newEntityID(),"massive",DisguiseType.Slime));

    replace "massive" with the size you want.
    bigger/massive/godzilla sizes are configurable, change if you want a different size.
     
Thread Status:
Not open for further replies.

Share This Page