I made my custom enchants plugin, it has alot of enchants, basically i just get a normal sword and to add enchant i use /n then the enchant name + level, to check if the item contains the enchant, it first checks if theres /n in the name(you cant change the name of a item with /n using anvil, so players cant add enchants to the sword) and if it does have /n in the name, it removes the first line(the sword's name) and searches the enchant, eg: (/n is a downline) Item name: "Diamond sword/nOblieterate III/nRage VI/nInquisitive V" Then to check i use: PHP: If(count($lines = explode("/n", $item->getCustomName())) > 0){ Unset($lines[0]); //$lines[0] = "Diamond sword" If(strpos("Obliterate", implode($lines, "/n")){ //i might used strpos wrong $level = $this->getCustomEnchantLevel($item, "Obliterate"); //sorry i didnt have time to show you how you get the level//do stuff, in this case you want to use $player->knockback() because obliterate has a chance to knock your target far. }} And thats it sorry if i made mistakes i usually do that, fix me
I think this link would be more accurate for NBT injection https://github.com/JackNoordhuis/Po...xplosivearrows/command/GiveBowCommand.php#L62
I'm not exactly sure how I hijacked it if I just asked a simple question ? About what the title says ...
i am sorry but your chances of meaning full responses would be better if you just made a new thread with more details not saying you must but it is a good idea since it is another plugin need helping
Yeah but you were the one who supplied an answer, even if it is a simple question, ASK IT ON THE FLIPPIN' NEW FORUMS
No no no no people should have freedom to ask wherever they wished BUT if they want more support they should seek the new one either way if they still chose this one, we should just let them be and welcome them to the deserted town