Solved Option Scrolling?

Discussion in 'Plugin Development' started by MagmaticBacca, Sep 10, 2015.

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

    MagmaticBacca

    Im making a plugin where when spawned if you havent played before you are given 3 dyes. A blue die: Elemental Techniques, Red Dye: Specialty Technniques and a purple dye Divine techniques. each of these have more than one ability when clicked on.

    Similarly to MagicSpells but its source code isnt helping much so i wanted to go a different direction. I already have the effects of the tecniques but i want to know an easy way to be able to click on a dye and have it scroll theough options. For example i scroll through Elemental Techniques until i find uh... Water shot or whatever.



    Thx :D
     
  2. Offline

    blackpoiso

    Maybe when they click it, it sends them messages of their options, and they then type in chat the number of the option they want?
     
  3. Offline

    TomeDM

    You mean you want to create a custom inventory to display the different things to the player?
     
  4. Offline

    DoggyCode™

    Umm, there's a cool feature that I know of (it requires 1.8 spigot). When it's clicked it sends the player different messages (options), the player will then be able to physically click on that word in the chat then you do what you want.
     
  5. This doesn't require 1.8 spigot. You just need to send a PacketPlayOutChat to the player containing a json text with a clickEvent tag in it
     
  6. Offline

    DoggyCode™

    Oh, really? I thought this was a new feature that was added recently.
     
  7. Offline

    teej107

    @DoggyCode™ Nope. It's JSON text and I like it a lot. You can do the same with the /tellraw command.
     
  8. Offline

    MagmaticBacca

    Well what im thinking is that they will be in battle and what i want is that when they click on it it automatically goes to the next option. So they have no time to really click on a certain option
     
  9. Offline

    MagmaticBacca

    ? Anyone?
     
  10. Offline

    teej107

  11. Offline

    MagmaticBacca

    @teej107 neither let me clarify...

    MagmaticBcca clicks on Glass. Watershot Set. Magmatic Bacca Clicks again. Water Canon set.

    get it? i click on something and it sets an attack different from the last one
     
  12. Offline

    teej107

    @MagmaticBacca Store the player and their current attack (or something to identify one) in a Map. When a player clicks to change attack, cycle through the attacks and set the value in the Map to the one selected.
     
    CodePlaysMinecraft likes this.
Thread Status:
Not open for further replies.

Share This Page