PotionSplashEvent

Discussion in 'Plugin Development' started by Phinary, Jul 19, 2012.

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

    Phinary

    I want to make a custom potion using one of the unused splash potions. How can I do a check on PotionSplashEvent to tell which type of potion is used? For example, if they throw a Sparkling Splash Potion (Has no effects) how can I tell that Sparkling Splash Potion is the type of potion thrown? I have been trying for a while but I can't find any way to check for this
     
  2. Offline

    r0306

    Shaun Bennett
    You would have to get the damage value of the material and then compare it that of the sparkling splash potion which I think is 46.
     
  3. Offline

    Phinary

    Yeah I understand that, but I am trying to use it for the splash potion version, so my event listener is PotionSplashEvent. For the life of me, I cannot find out how to get the damage of the splash potion through this event
     
  4. Offline

    Kodfod

    r0306
    You should get on the wiki and post potion how-to's so you can just refer them there + it would be a great addition.
     
    r0306 likes this.
  5. Offline

    r0306

    Shaun Bennett
    Rather than listening to that event, why not listen to player interact event and check the item in their hand?

    Kodfod
    Lol. I just might. ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  6. Offline

    Kodfod

    Good =D i would help out if you need help (doubt it =P)
     
  7. Offline

    Phinary

    Because I need to know the location of where the splash potion hits the ground along with what players are affected by it

    Kodfod unfortunately that isn't going to help me one bit since since the method he posted won't work for what I am trying to do. I already have a good idea on how this would work, there just seems to be no way to get the info of a potion with no effects using the splash potion listener,
     
  8. Offline

    r0306

  9. There already is a wiki with all data values for every potion and every upgrade of potion: http://www.minecraftwiki.net/wiki/Data_value#Potions
     
  10. Offline

    Kodfod

  11. That's javadoc, not wiki, and there's not enough room to post all data values.
    Also, there's no point in noting them somewhere else when you can just use the minecraft wiki.

    Aand also, unrelated to this... but I don't know why everybody uses this,here,click links... they're annoying and really bad for search engines... just use whatever you're linking to in the name.... like: "I was meaning for the Bukkit API for plugin developers...".
    Just something I wanted to share :p
     
  12. Offline

    Kodfod

    1. Minecraft wiki doesn't tell you how to add them to a player with a bukkit plugin.
    2. Here, This, Click Are all Shorter than Bukkit API. It;s pure lazyness on my part, and yes it may be wrong but, the title should be named appropriately for the help the player is looking for. The title Will more than anything match what is being answered, Now i know that is not 100 true, but it is still true.

    I understand all of your concerns and have taken them into account, However, I still believe that having a bukkit wiki page on potions and how to add/remove/change potion effects is a needed page considering all the questions being asked about it. We could Link them to the Wiki and further help as needed.
     
  13. Yes but the Bukkit wiki does tell how to add items and it also tells items can have IDs and data values... and data values can be found there :} I feel like Minecraft wiki is more reliable for Minecraft specific stuff and Bukkit wiki contain the links, yes.
    Still, most people that ask questions don't even search the wiki, the javadocs and not even the forum, they think their problem is new and unique when most of the time is not :/

    How is "Bukkit API like found here" shorter than "Bukkit API" ? :confused: (while ignoring the URL BBcode and the surrounding text because they're the same for both cases)
     
  14. Offline

    Kodfod

    lul point made, still i think (from a giver stand point) that having the wiki page could be beneficial for some people. Can't hurt to make one. If all else fails we just wasted what 25 mins making a wiki page =P
     
Thread Status:
Not open for further replies.

Share This Page