Hello, Is there anyway to create custom enchants on weapons/armors with custom items? Like Rubys and the enchant can destroy the previous enchant
I don't really know,... eat this guy's video. And uh, at least, learn something, you can ask what you did not understand here, and hopefully people will help. Check this, it kind of covers some parts, you can skip through tho, it's quite long: very long video beware
You could create a custom enchantment in the form of lore for an item. For example "Blasting V" on a pickaxe. Then you catch block break events and check whehther the player is holding an item with said lore. If so, you break all blocks around the broken block. Custom enchantment for ya. The same can be done for swords. Say you wanna make a Zeus enchant or something. You set custom lore for a sword and on entity damage events, if the weapon was said sword, you cast a lightning bolt on the entity.
As a server owner. The thing is not books, I want a system with diffrent rubys. Green Ruby 5% ... Blue Ruby 7% etc. And the first ruby has 75% to success, the second 65% etc. and if it does not succeed it breaks one enchant from the sword/armor
cough Request it then ;-; Am i paranoid or i saw that this topic used to be in the development section...
@Shqep Quick question regarding the video: Been trying to understand what NamespacedKey exactly is, since it doesn't work with an Integer ID in the constructor anymore. And according to the bukkit docs, NamespacedKey requires the plugin and a String key. So I think the constructor and getId would have to look like that: Code:java public CustomMagicGlowing(NamespacedKey id) { super(id); } public NamespacedKey getId() { return(plugin, "name_of_key") } But first, how do I access the plugin when my class extends Enchantment, but not JavaPlugin directly (tried CustomMagic plugin = CustomMagic.getPlugin(CustomMagic.class); ) but it doesnt seem to work (it returns type CustomMagic). Now secondly I still have no clue what NamespacedKey actually is used for and more specifically, how to use it.
@timtower Thanks for that ;-; I thought I was really being scammed by tapatalk EDIT: @wand555 Here's the JavaDoc for org.bukkit.NamespacedKey. I think NamespacedKey is just a replacement for the "int id" in later versions. About the plugin instance, why don't you pass it using a constructor? PHP: public MyClass(final Object... randomParameters) { //Hi, my name is "Constructor". I love initializing fields for you to create polished objects! //My friend "static" is dominating me :< pls love me again } Correct me if I'm wrong, I'm going to be stupid and unsure for a while. If your class (CustomMagic) is extending JavaPlugin which implements Plugin, shouldn't that mean an instance of CustomMagic will be accepted by the other guys, JavaPlugin and Plugin? Ok, whatever...