Disable Certain Potions

Discussion in 'Plugin Requests' started by mbogacz, May 30, 2016.

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

    mbogacz

    Hi, I am making a faction server and I want it to be kind of a hybrid between regular factions and hardcore factions. I'm wondering if there is a plugin for disabling certain potions, like regeneration, strength and harming. I tried to do this via essentials, and it completely disabled potions. Can anyone help me?
     
  2. Offline

    MrGeneralQ

    Hi!

    Yes ofcourse it is possible. But do you want us to create the plugin or just the code on how to do it?
     
  3. Offline

    timtower Administrator Administrator Moderator

    srspore likes this.
  4. Offline

    MrGeneralQ

    If you want to I create The Plugin. Provider me all The nessecay details please.
     
  5. Offline

    mbogacz

    Hi, yes I would like for you to create the plugin.

    Specifically, I would like to disable

    -every single type of regeneration
    -every single type of strength
    -every single type of invisibilty
    -every single type of instant damage/harming potions


    If you could create this plugin, it would really help me out. Thank you in advance.
     
  6. Offline

    MrGeneralQ


    • ConfigurationFile needed to choose potions that are blocked?
    • Do I have to disable actually drinking the potion or crafting or?
     
  7. Offline

    mbogacz

    I would like to completely disable the ability to brew them.
     
  8. Offline

    MrGeneralQ

    Alright
     
  9. Offline

    mbogacz

    Can I get an ETA on this plugin? Sorry not meaning to rush you.
     
  10. Offline

    MrGeneralQ

    ETA? sorry? What is that? And don't worry. I'll do my best.
     
  11. Offline

    timtower Administrator Administrator Moderator

    @MrGeneralQ Estimated Time of Arrival.
    How long it will take.
     
  12. Offline

    mbogacz

    So umm yea, when do you think you can finish it? Im planning to get a server host on the weekend so I would like to have it by then.
     
  13. Offline

    MrGeneralQ

    @mbogacz , that sounds fair. I'll start coding today.

    @mbogacz

    I've done some research, but I have some trouble in restricting the crafting of potions. However, I can easy fix that they can't consume the potions you decide in the config file. Is that alright?

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

    mbogacz

    Yes it is alright, I don't really mind as long as they are unusable.
     
  15. Offline

    MrGeneralQ

    @mbogacz

    The plugin is done! So I have uploaded the plugin to my bukkit plugins, now just wait until it's getting accepted.
    This is how It works.

    First of all I made the plugin so that it is checking for Potions, SplashPotions AND LingeringPotions. In the config file just change the values to 'true' of the potion that you want to restrict usage.

    Without further a do, here is the plugin!

    http://dev.bukkit.org/bukkit-plugins/potion-restrict/

    I hope you like it and please give feedback :) thnx!
     
  16. Offline

    mbogacz

    Im so sorry I forgot to tell you this earlier, but is it possible to make this plugin compatible with version 1.7.10? This is what my server is on and when I tested it, it did not work.

    This is the error I am getting :


    Caused by: java.lang.NoSuchMethodError: org.bukkit.inventory.meta.PotionMeta.getBasePotionData()Lorg/bukkit/potion/PotionData;
    at me.mrgeneralq.potionrestrict.PlayerConsume.playerConsume(PlayerConsume.java:34) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    ... 17 more
     
    Last edited: Jun 7, 2016
  17. Offline

    MrGeneralQ

    Ofc it doesn't work. Wel I can do that but why? I'll have to recode everything. Can't you update to 1.9?
     
  18. Offline

    mbogacz

    My factions server is strictly 1.7.10. This is because most hcf players play on minecraft 1.7.10 because it has the smoothest pvping experience(Of course this is debatable). Minecraft 1.8 destroyed block hitting and 1.9 has shields. If you have ever played on an hcf server you would know that everyone hates minecraft 1.8 and up. Also, ever since 1.8, tnt cannoning was broken, and version 1.7.10 does not have this issue.

    If you can pull this off it would be awesome, I'm so very sorry for the inconvenience.
     
  19. Offline

    mbogacz

    Do you think you will do it?
     
  20. Offline

    MrGeneralQ

  21. Offline

    mbogacz

    Thank you so much.
     
  22. Offline

    tkuiyeager1

    If you use eclipse you can just change the external jar to 1.7.10 no?
     
  23. Offline

    timtower Administrator Administrator Moderator

    Yeah, but doesn't work that well when he is using 1.9+ classes.
     
  24. Offline

    tkuiyeager1

    Ok, thanks.
     
  25. Offline

    MrGeneralQ

    @timtower

    You know how to get the 1.7.10 jar file by any chance? Seems It doesn't exist in Buildtools?
     
  26. Offline

    timtower Administrator Administrator Moderator

  27. Offline

    mbogacz

    Would it be possible to have it done by this friday? Sorry for the rush but I'm kind of almost a week late with everythinf
     
  28. Offline

    MrGeneralQ

    This afternoon it should be done

    Update: There is a problemen with a methode that isn't available in early minecraft versions. However, zombie striker said a possible answer.

    I try this tomorrow
     
    Last edited: Jun 15, 2016
  29. Offline

    mbogacz

    Please let me know
     
  30. Offline

    MrGeneralQ

    I will
     
Thread Status:
Not open for further replies.

Share This Page