Change with entity

Discussion in 'Plugin Development' started by chikenlitle99, Aug 10, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    chikenlitle99

    Hi, how I can change a block when placed on a horse?

    Like SurvivalGames :p
     
  2. can you explain it with more detail?? thats only 2 sentences and i don't understand what you want :D
     
  3. Offline

    XxandrimaxX

    hombre si intentas hacer el survival games de olimpo yo tengo todos xD estoy trabajando para un server si kieres esa parte del codigo dimelo por skype
     
  4. Offline

    chikenlitle99

    FisheyLP
    Yeah!
    *I have a block of stone
    *When i put the stone block on the ground, automatically the block of stone disappears and becomes in a horse with armor and all

    XxandrimaxX

    Me pidieron que modificara un plugin de sg y el tipo quiere que le ponga eso y algo que hacen los cofres pero no me lo explico bien, ya te envie el mensaje si me lo pasas estaria perfecto

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

    Gamecube762

  6. Offline

    chikenlitle99

    Gamecube762
    Thanks!

    You must also use the translator to understand the Latino n_n
     
  7. Offline

    Hedgehogs4Me

    Note: if you cancel the event like Gamecube762 suggests, you'll also have to remove the item from the player's item in hand itemstack.

    If you don't want it to happen with all stone, you can make it dependent on the name, the lore, enchantments, or any number of things. I wouldn't use damage values unless you're sure it's a good idea - for some items it will reset to 0 in certain circumstances.
     
  8. 1. BlockPlaceEvent
    2. Check if the block is stone
    3. Set the block to air
    4. Spawn a horse on the location of the block
    5. Give the horse armour
    :)
     
Thread Status:
Not open for further replies.

Share This Page