Spigot: Custom Plugin Tutorial - Custom Items (#6)

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 177

  • @TechnoVisionTV
    @TechnoVisionTV  4 года назад +70

    Just a reminder that these videos are meant as examples! You should take these examples as knowledge and inspiration to make your own plugins in your own unique way.

    • @MancoBlanco
      @MancoBlanco 4 года назад +2

      First. Comment on your comment

    • @_mrxzet_-3037
      @_mrxzet_-3037 4 года назад +1

      Thank you for your tutorials!

    • @that_kaii
      @that_kaii 4 года назад

      Wait? Spigot is like a plug-in to make gui of something like furnaces?
      Sorry I am new to modding

    • @frostingly3687
      @frostingly3687 4 года назад

      IKONIK spigot is an api

    • @1gryff491
      @1gryff491 3 года назад

      what if i want to create explosion infront of player?

  • @slopeydopey3108
    @slopeydopey3108 4 года назад +12

    Just some friendly advice,
    It's generally good practice to keep the scope of your class fields private whenever you can to prevent memory leaks and namespace errors. You could add your public static void init() functionality into a constructor of ItemManager.
    So you would write public ItemManager(){ }. Also, in java the common practice is to declare your class variables as private, so you would have a private ItemStack wand; and create public getters and setters.
    getters and setters look like this, and IntelliJ IDEA will autocomplete them for you
    public void setWand(ItemStack wand) { this.wand = wand;}
    public ItemStack getWand() { return this.wand; }
    'this' is a keyword that tells java that you are referencing the field instance of your class and not a static one.
    You know it's good to teach the newcomers good practices.

  • @_mrxzet_-3037
    @_mrxzet_-3037 4 года назад +43

    I love you, I just adore you, you are the only one who can tell cool how to create mods and plugins, you just can’t imagine how I want to get to know you !!!! You are simply the best !!!!

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад +10

      This made my entire month, thank you!! You are so sweet :)

    • @_mrxzet_-3037
      @_mrxzet_-3037 4 года назад +1

      @@TechnoVisionTV No reason, it's all because you're the best! :ь

    • @cattack
      @cattack 3 года назад +1

      love you, too!

    • @iprobablyhack187
      @iprobablyhack187 3 года назад +1

      uwu

    • @scyye-gaming
      @scyye-gaming 3 года назад +1

      @@cattack I would be mad if the other guy didn’t say “uwu”

  • @examplewastaken
    @examplewastaken 4 года назад +10

    Man! I gotta say something here! When I started learning Spigot, I really missed videos that were actually educational and that explained what was actually happening, instead of just showing the code. I can only say to everyone, who is still at the beginning of their journey, this is perfection! In my opinion there is almost no better way to show and teach how it all works!
    A little tip/wish I'd have: Could you move to Paper? It's basically Spigot, but with even more functions. Every Spigot plugin will work with Spigot, since it's just an improved version of Spigot. And it has much better performance. Asynchronous chunk loading is just one of them.
    It's a shame this video has only 42 likes!!

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад +4

      Thank you for the kind words, that means so much to me! I'm so glad you're enjoying the video

    • @examplewastaken
      @examplewastaken 4 года назад +1

      @@TechnoVisionTV yeah that makes sense. Although Paper is 100% compatible with Spigot.

  • @MancoBlanco
    @MancoBlanco 4 года назад +13

    I love your tutorials and am now moving on to making something like this to put on spigot

  • @tacticalkazooie466
    @tacticalkazooie466 4 года назад +1

    I'm completely new to plugins, and this tutorial was amazing! Thanks so much!

  • @gabehd6190
    @gabehd6190 4 года назад +1

    Your plugin tuts are sooo easy to learn

  • @lily38942
    @lily38942 4 года назад

    thank you for realizing likes and views arent the only thing that matters and teaching people even if it is only 4000

  • @supericeg5913
    @supericeg5913 2 года назад

    Holy crap this is useful, I'd give you a hug if I could.

  • @hridaymeka5838
    @hridaymeka5838 4 года назад +5

    great vid techno!

  • @fantasypvp
    @fantasypvp 8 месяцев назад

    7:33
    enchantment levels higher than the maximum required setting the boolean value to true.

  • @theyeetster1269
    @theyeetster1269 4 года назад +1

    I like both serieses :D

  • @Dorothy__c9d
    @Dorothy__c9d 5 месяцев назад

    An intimate discussion with Binance's CEO about future developments

  • @eclipse1343
    @eclipse1343 4 года назад +1

    This helped alot, thanks dude!

  • @Krishavgandhi
    @Krishavgandhi 3 года назад +4

    Bro your tutorials are amazing and this has helped me out a lot, I want to make a plugin that changes what an item drop is, like wood drops diamonds or leaves drop iron, can you make a tutorial on that, thanks

  • @mysterado7795
    @mysterado7795 4 года назад +2

    just a question, is it possible to have custom textures for each without requiring a texture pack?

  • @vkolasa
    @vkolasa 3 года назад +1

    I really like this, now I just need to figure out how to add cooldowns to this along with say, an xp cost also ?

  • @gabegaming9222
    @gabegaming9222 4 года назад +1

    Can you do a tutorial on how to get custom player heads in a plugin. (For example I want to make a backpack and I want to use a player head texture for it)?

  • @gdviciousbee2715
    @gdviciousbee2715 3 года назад

    4:29 but isn't gold color text only in bedrock edition of MC?
    Edit: I was looking at the wrong color code, it was minecoin gold that was only for MC bedrock

    • @gdviciousbee2715
      @gdviciousbee2715 3 года назад

      Also not to mention your tutorials are easy to follow and understand so yep it was easy learning with you teaching!

  • @requenz_
    @requenz_ 4 года назад

    I think you said that wrong. If you want your enchants to go over the Minecraft default values, you should have "meta.addEnchant(Enchantment., , true/false); to true. Having it on false will make your item unenchanted if you put a higher value than Minecraft's default.
    Otherwise, great video!

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад +2

      Yes ur totally right! Sorry about that

  • @TheStroker986
    @TheStroker986 3 года назад +1

    Do you know of a way to keep the item from being used? For example if that was an enchanted string instead of a stick, it would place a tripwire and consume the string.

    • @tobyapellido1527
      @tobyapellido1527 3 года назад +1

      With an event that checks whenever that item is used an cancell the event

  • @scriptoblox
    @scriptoblox 10 месяцев назад

    for some reason my thing doesnt work with comparing the item metas and just stops then. i already tried by only checking if it is a stick and then it worked (obviusly then every stick worked) but when i tried checking if the name was the same it didnt work again. i checked the code multiple times and im 99% sure that my code is the same. im kind of new to java and especialy to plugin development pls help. i think it might be something with that spigot probably changed.

  • @swibzzz
    @swibzzz Год назад

    Would be nice you could create a tutorial for using custom items in recipes. For example I have 32x cactus in the 3 slots on top row in a crafting table and 32x in each slot for the 2 rows in the 2nd row. That''ll craft 1 for example enchanted cactus. and you can't use the custom items to craft enchanted cactus again only non custom items. I keep running into problems trying to do this but no good tutorials that explains it.

  • @ADox_Short
    @ADox_Short 2 года назад +1

    omg it worked ty so much!

  • @amazingmation97
    @amazingmation97 4 года назад +3

    Yay love your videos!!!

    • @8ballpizza765
      @8ballpizza765 4 года назад

      amazingmation 97, congratulations
      You are first

  • @deyol1352
    @deyol1352 4 года назад +1

    I did everything same but it gives me normal item not mine custom

    • @deyol1352
      @deyol1352 3 года назад

      @Stefan Rial nope i did that

  • @tanjakilibarda9802
    @tanjakilibarda9802 3 года назад +1

    how can i make an explosion like 5 blocks in front of the player
    pls help

  • @smurfie3828
    @smurfie3828 3 года назад +2

    how do you make it so the custom item gives you potion effects?

    • @ybacornae7851
      @ybacornae7851 2 года назад

      you have to make a listener look up listener tutorial on mc

  • @elevatorcait
    @elevatorcait 4 года назад +3

    I'm not making a plugin, but when do you plan to get to entities in the modding tutorial?

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад +2

      Probably not till a bit later on. Still have to get through ore gen, advanced items, advanced block models, events, and a few other things

    • @elevatorcait
      @elevatorcait 4 года назад +1

      @@TechnoVisionTV ok those sound fun too! :)

    • @examplewastaken
      @examplewastaken 4 года назад +1

      @@TechnoVisionTV this just proves how much thought is put into your videos! As you can tell, I'm impressed! 😅

  • @jvigel2101
    @jvigel2101 4 года назад +3

    why did you get rid of the github repo for the plugins?

    • @sputnick1
      @sputnick1 3 года назад

      its now under github.com/TechnoVisionDev/Spigot-Coding-Tutorial/

  • @SlushiGaming
    @SlushiGaming 4 года назад +2

    when i am in the pluginmanager folder i try to do the Player player = (Player) sender; and the sender is red and wont let me do anything. if anyone can help thanks so much.

    • @yoitsrt
      @yoitsrt 4 года назад

      Sorry for late response. Did you import it?

  • @earthfueledgaming
    @earthfueledgaming 3 года назад

    Hey there, not sure if you still check these but you mentioned at the start that the Material only works with 1.13+. Does that mean the entire tutorial cannot work for versions below that? Or you would use something else for the material?

  • @nils9293
    @nils9293 Год назад

    Im a Java beginner and I have a question. Wouldnt it make more sense to make ItemManager an object? I mean everything in this video is object based why not make this class too?

  • @pickleminh1250
    @pickleminh1250 Год назад

    Thanks a lots for your tutorial! But how can i add custom texture to my items?

  • @makyverp9172
    @makyverp9172 3 года назад

    why does it say Could not load 'plugins\Tutorial.jar' in folder 'plugins' when i wrote the plugin.yml and everything??

  • @Damond_Warrior
    @Damond_Warrior 3 года назад

    Hello i want a armorstand with a custom id to represent my item that when right clicked on the ground places a liquid how should i do this?

  • @ArnavBoom
    @ArnavBoom 4 года назад +1

    When I type the command in chat and hit enter, nothing happens

    • @nocommentary7126
      @nocommentary7126 4 года назад

      same here but for me it says the command name in chat

  • @BittoyStudio
    @BittoyStudio 4 года назад

    Thank you very much!

  • @Kiddvverde
    @Kiddvverde 2 года назад

    Can custom items have cooldown? i cant find a way to give cooldown to my item

  • @lugoti1
    @lugoti1 2 года назад

    its all okay but i cant start the server with the plugin and i dont know why.
    Somebody knows why?
    and then it says this "(Package name) clashes with class of same name" does anybody knows why?!

  • @levdywaterson398
    @levdywaterson398 4 года назад +1

    hello you may not see this but i would like to ask if you can make a video on how to make a pickaxe a sword and armor

  • @vincentpizzo8727
    @vincentpizzo8727 4 года назад

    how would you do it if you wanted the explosion to occur at the block that is right clicked and not at the players location?

    • @zulan3129
      @zulan3129 3 года назад

      get the location of the block

  • @sunheejeon1732
    @sunheejeon1732 3 года назад

    Hey man, its been a while since the video released, but its still really helpful. Do you think I can use this to create the hyperion item from hypixel skyblock?

  • @ValidT
    @ValidT 3 года назад

    I made the custom item just fine but how could i make it craftable with a custom recipe

  • @touhidrabbenyshafin8471
    @touhidrabbenyshafin8471 2 года назад

    Hey! I have a quick question:
    "How do I make my Custom Item Non-Stackable?"

  • @TheCoolCheesecake
    @TheCoolCheesecake 3 года назад +1

    I’m just going to ask. How can I add a custom texture to my item? Thanks

  • @larsmars2764
    @larsmars2764 4 года назад

    19:13 how can I shoot arrows for example instead of doing an explosion?

    • @larsmars2764
      @larsmars2764 4 года назад

      and another Question : as soon as I want to register my Event into may Main class, following Message appears "the Method registerEvents(Listener, Plugin) in the type PluginManager is not applicable for the Arguments (itemEvent, Main)" - Would appreciate help :)

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад

      @@larsmars2764 You are using the wrong arguments. Follow the implementation of the method registerEvents.
      Also shooting an arrow is spawning an entity

    • @larsmars2764
      @larsmars2764 4 года назад

      @@TechnoVisionTV 1. Yeah I noticed, I forgot to save my project, that's why it couldn't recognize on my main class. Oopsie xD and 2. Thx for your help :)

    • @larsmars2764
      @larsmars2764 4 года назад

      @@TechnoVisionTV I did it with the arrows, but idk what to type for the location... I wrote [...].spawnEntity(p.getLocation(), EntityType.ARROW);

  • @frameinsea
    @frameinsea 2 года назад

    Hi this tutorial helps me alot but, Can you make a tutorial on how to make a custom texture in these?

  • @torsteinmartinsen2718
    @torsteinmartinsen2718 3 года назад

    How come, when I write
    ItemStack item = new ItemStack(Material.STICK, 1);
    I get an error because I provided Material when IMaterial was expected? Is this an update? How do I use IMaterial?
    great tutorials, btw

  • @ohhello9577
    @ohhello9577 3 года назад

    I think this is because of a new update, it says the material under the lore in the game. Is there a fix for this? I've done HIDE_ATTRIBUTES

  • @xmortybro
    @xmortybro 2 года назад

    Love this Video

  • @8ballpizza765
    @8ballpizza765 4 года назад +2

    Im trying to make it so I can feed chickens a certain item, how would I do this. Ps this Is forge 1.15.2 im talking about
    Edit: I mean exactly like seeds

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад +2

      Could be wrong, but I think this is part of the chicken entity, and not the food item. You'd likely have to make your own chicken entity that overrides vanilla's and change the items it can use to breed.

    • @8ballpizza765
      @8ballpizza765 4 года назад +1

      TechnoVision
      Thanks so much, ill look in to this. Will you by chance be doing entities in your series?

    • @TechnoVisionTV
      @TechnoVisionTV  4 года назад +1

      @@8ballpizza765 Yes most definitely

    • @8ballpizza765
      @8ballpizza765 4 года назад +1

      @TechnoVision
      Thank you for all of the great tutorials, you are the only one who has made tutorials that are straightforward and easy to understand. I can't wait until the next tutorial! :)

    • @rileytallman
      @rileytallman 4 года назад

      @@8ballpizza765 TechnoVision does great videos don't get me wrong, but hes not the only one. {TheSourceCode} put out 30 tutorial videos on Spigot 2 years ago

  • @zoopssss
    @zoopssss 4 года назад

    I keep getting "Not annotated parameter overrides @NotNull parameter" after the onCommand line any advice?

  • @Thetrickbros
    @Thetrickbros 3 года назад

    Can this work on 1.12.2? and you are really good because when i following you tutorial i know how ti works and i can change stuff as my i want

  • @user-mz2do1tl8g
    @user-mz2do1tl8g 3 года назад

    i have an error saying spigot cannot be resovled to a module any help on how can i fix it?

  • @redberryplayz2901
    @redberryplayz2901 3 года назад

    Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.redberry.sweet.Sweet.getCommand(String)" is null i am getting ths error

  • @serjordan13
    @serjordan13 3 года назад

    For some reason, the event happens 4 times for every 1 right click with the stick. It explodes 4 times, sends 4 messages in chat, and spawns 4 entities. How do I make it only run once?
    edit: After some more testing, it sometimes does it only twice, but idk why.

  • @DreamerPlayz001
    @DreamerPlayz001 3 года назад

    github: github.com/TechnoVisionDev/Spigot-Coding-Tutorial

  • @GaLzZy.
    @GaLzZy. 4 года назад

    For when are advanced custom items ? :) Great tutorials :)

  • @kvgamer709
    @kvgamer709 2 года назад

    Can make aspect of the end with it?

  • @Pixeloided
    @Pixeloided 3 года назад

    Is it possible to make the item be wearable? (Like putting a glass block on your head for a space helmet, scuba helmet, or something like that) Great video!

    • @nils9293
      @nils9293 Год назад

      I think not in Vanilla but people are experiment a lot with player skulls, invisible armor stands and custom server textures.

  • @ImBenji
    @ImBenji 4 года назад

    im getting errors everytime i try and build it and use it in my server any suggestions ?

    • @LynJuice
      @LynJuice 3 года назад +2

      look at the error

  • @MrPokerGaming
    @MrPokerGaming 3 года назад

    bruh Ive been wondering why didn't it work for me until I found out that plugin.yml I typed command: not commands:

  • @gabehowe
    @gabehowe 4 года назад

    this is pretty cool

  • @benrees5705
    @benrees5705 3 года назад

    Is there a way to may a custom consumable item?

  • @fayazsiddiquee29
    @fayazsiddiquee29 3 года назад

    this isnt working for me :( (im in 1.16 and the item isnt registered for me how do I fix that?)

  • @dylanrnow
    @dylanrnow 3 года назад +1

    Does this work on 1.16.5?

  • @lolkudu241
    @lolkudu241 3 года назад

    I love it man!!! love from Hungary!!!

  • @Oliver-ou5wf
    @Oliver-ou5wf 4 года назад +1

    can you make a tutorial on creating custom block?

    • @RappyyTV
      @RappyyTV 3 года назад

      Thats only possible with mods

    • @Oliver-ou5wf
      @Oliver-ou5wf 3 года назад

      @@RappyyTV I actually figured out a method that uses textured items in in item frames

  • @optical1867
    @optical1867 3 года назад

    @TechnoVision thanks, everything works except the event's do you think there's a solution? I've tripled checked and the stick never works. thanks
    edit: I am trying to make infinite rockets for elytra's

    • @TechnoVisionTV
      @TechnoVisionTV  3 года назад

      Are u sure you are registering/enabling your events class in your startup method? My best advice would be to put console print statements in various locations to see where ur code stops executing

  • @jaspersieben7606
    @jaspersieben7606 4 года назад

    If its Doesnt work with commant make static {} instead of public static void init {}

  • @woconnell7549
    @woconnell7549 4 года назад +2

    How do you post so much

  • @josiah2070
    @josiah2070 3 года назад

    how do i detect when a player is holding that item?

  • @zerosypher0114
    @zerosypher0114 3 года назад

    how would you change that custom item's texture?

  • @pixllevin1991
    @pixllevin1991 3 года назад

    How do i check if a player is holding an item?

  • @yaral4
    @yaral4 3 года назад

    hey, i know this is 1 year old video but still if anyone knows givewand dosent work for me

  • @thedestroyer5234
    @thedestroyer5234 2 года назад

    how do i implement this into a gui?

  • @exilre8670
    @exilre8670 3 года назад +1

    It gave me only a stick without the colorcode or enchants!!

    • @rxn7
      @rxn7 3 года назад +1

      You forgot to do
      ItemStack::setItemMeta(meta)

  • @comical.fellow
    @comical.fellow 4 года назад

    Whenever i do the command it repeats the command in chat instead, is there a reason for this?

    • @Noah-fu3xk
      @Noah-fu3xk 4 года назад

      Make sure the event returns true

  • @drewdevinproductions5173
    @drewdevinproductions5173 3 года назад

    how do I make the symbol for the color coding?

  • @lukashrehor9540
    @lukashrehor9540 3 года назад

    how do i import the ItemManager.init ?????

  • @breadan25
    @breadan25 3 года назад

    Does ItemManager not exist anymore for 1.16.5

    • @Sr-xn9cg
      @Sr-xn9cg 3 года назад

      what can be replaced?

  • @XDRmc
    @XDRmc 3 года назад

    U ARE THE BEST!

  • @6L6Lcephas
    @6L6Lcephas 4 года назад

    Good tutorials

  • @SubhashChandraGupta2021
    @SubhashChandraGupta2021 3 года назад

    how to put custom plugins on a server??? pls tell me need help :

    • @RappyyTV
      @RappyyTV 3 года назад

      in the plugins folder?

  • @willu8531
    @willu8531 3 года назад

    I'm sad that this won't work due to newer version

  • @cattack
    @cattack 3 года назад

    i can't explode me with the wand...? I'm on a 1.16.5 server

  • @froby7123
    @froby7123 4 года назад

    Why do you have to have your mic close to your keyboard..?
    This is ASMR

  • @mrpancake5761
    @mrpancake5761 3 года назад

    how to create food?

  • @E_mosfet
    @E_mosfet Год назад

    does this work in 1.19

  • @blackettv9887
    @blackettv9887 2 года назад

    When i right a block is says "You dare use the stick of truth?!" 2 times? when there's only one code line with player.sendMessage("You dare use the stick of truth?!");

  • @gamingwithvaibhav2787
    @gamingwithvaibhav2787 3 года назад

    hi please make a video on mob drop

  • @MrPanda-hi5rv
    @MrPanda-hi5rv 4 года назад

    How to set cooldown???

  • @blushingbutterfly7742
    @blushingbutterfly7742 3 года назад

    cool video.
    small tip:
    instead of ItemManager.init,
    you could use its constructor,
    which is defined as follows:
    public ItemManager {
    }
    then you can instance a new ItemManager, and this function is automatically run.
    hope i could help

    • @rxn7
      @rxn7 3 года назад

      But thats a static class
      It doesn't call constructor because we never instantiate an object from it

  • @proykk2071
    @proykk2071 3 года назад

    We have the same skin :)

  • @Coloneldata
    @Coloneldata 3 года назад

    oh my god. thank you yeah, BUT SLOW DOWN PLEASE

  • @fizzle._12
    @fizzle._12 Год назад

    21:13

  • @coolno3806
    @coolno3806 4 года назад +1

    wo w there are 69 plugins

  • @shortybsd
    @shortybsd 4 года назад

    Sup Techno, your github link is invalid. github.com/TechnoVisionDev/Spigot-Tutorial should be github.com/TechnoVisionDev/Spigot-Coding-Tutorial

  • @ddg-norysq1464
    @ddg-norysq1464 3 года назад

    You just baited me :|
    I thought this was about adding new CustomItems