Spigot Plugin Development - 52 - Command Managers

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024
  • In this episode, I show you how to make a Command Manager for your Spigot plugin to easily manage sub-commands. This will make your life much easier, trust me. I will apply this concept to the Quarter Master plugin, next episode. #Spigot #MinecraftPluginDevelopment
    Code: gitlab.com/kin...
    ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've tried it an it's awesome! www.kite.com/g...
    Discord: rebrand.ly/dis...
    Support: / @kodysimpson
    More Videos coming soon.
    Leave a comment for any future video suggestions.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 32

  • @AchyMake
    @AchyMake 2 ปีที่แล้ว +1

    awesome you taking you're time making these videos, helped me alot to make some fun plugins

  • @happybavarian0755
    @happybavarian0755 7 หลายเดือนก่อน

    really love this manager. this inspired me to make my own version of it in which i added some cool features and now i use it in almost all of my plugins and its so easy to use and to understand. still one of my favorite coding channels to date. hope you dont mind that i took inspiration? i can show you if you want and then you can judge

  • @dylanroberts6217
    @dylanroberts6217 4 ปีที่แล้ว +12

    Something I thought of was to use a HashMap for a juicy O(1) time complexity. The String just stores the subcommand so you can use hashmap.get("KEY") to check if it's null or not, and then have access to the SubCommand object. :)

    • @SanoKei
      @SanoKei 4 ปีที่แล้ว

      Thinking the same thing, glad you typed it out!

  • @nubdotdev
    @nubdotdev 4 ปีที่แล้ว +3

    You should make SubCommand an interface, or actually implement the getters

  • @brendanbutters7588
    @brendanbutters7588 5 ปีที่แล้ว +3

    Thx this will be helpful! Any plans on doing a vid regarding tab competition?

    • @KodySimpson
      @KodySimpson  5 ปีที่แล้ว +2

      Could you maybe give me an example? Or if you could show me a plugin that has this feature

    • @brendanbutters7588
      @brendanbutters7588 5 ปีที่แล้ว +2

      Kody Simpson off the top of my head LuckPerms I believe has this feature where you can click tab to cycle/complete cmd args and I think essentials has it for some cmds like /home or /warp where you can cycle through the warps or homes.

    • @KodySimpson
      @KodySimpson  5 ปีที่แล้ว +4

      @@brendanbutters7588 Interesting! Thanks, I'll take a look

  • @jaime7295
    @jaime7295 4 ปีที่แล้ว +2

    Wow so much easier and cleaner than codesource's video xd

  • @Braekpo1nt
    @Braekpo1nt 3 ปีที่แล้ว +1

    Super helpful, thank you!

    • @KodySimpson
      @KodySimpson  3 ปีที่แล้ว

      Glad it was helpful!

  • @THBeatZz
    @THBeatZz 4 ปีที่แล้ว +1

    whats the song name playing in the intro kody?

  • @Bl0xxy
    @Bl0xxy ปีที่แล้ว

    How do I make a SubCommand to a SubCommand?

  • @yayer_27
    @yayer_27 3 ปีที่แล้ว +1

    that's so cool

  • @DoDisturbedTv
    @DoDisturbedTv 4 ปีที่แล้ว

    Is it possible to do something like this for multiple commands that may not necessarily need sub commands? Or would i need to make a class similar to the commandmanager multiple times.
    A plugin I'm working on is getting very messy with all my commands being in one class.
    Probally over thinking this but it would be helpful if anyone can point me the right direction.

    • @perosinalmc7143
      @perosinalmc7143 3 ปีที่แล้ว

      can u even have two different commands in one class??? how do u…nvm

    • @scyye-gaming
      @scyye-gaming ปีที่แล้ว

      @@perosinalmc7143 switch-case blocks on the command ran

    • @Alexxxychep
      @Alexxxychep 4 หลายเดือนก่อน

      ​@@scyye-gamingpractically no oop

  • @dominocoding
    @dominocoding 5 ปีที่แล้ว +1

    I suggest telling what does the topic mean, like in this video, there are some beginners don't even know what does sub-command mean, so I suggest saying what does the thing you're talking about and making a Toturial about mean and what does it benefit and help us in. On the first of the video.

    • @KodySimpson
      @KodySimpson  5 ปีที่แล้ว +3

      I do explain subcommands in the beginning of the video, but this is episode 52, so I do expect a level of understanding at this level. Thank you for the input

    • @9kmusic201
      @9kmusic201 5 ปีที่แล้ว

      He did explain what sub-command is, and if you are a beginner/somebody else he/she should watch from episode 1 as kody metioned

    • @dominocoding
      @dominocoding 5 ปีที่แล้ว

      @@9kmusic201 so sub-command is the name of the normal spigot plugin? Or something else?

    • @9kmusic201
      @9kmusic201 5 ปีที่แล้ว

      iiH7oussaM_ Gaming sub command is what comes after the command for example
      /spawn diamond - /spawn is the command and diamond is the sub command

    • @dominocoding
      @dominocoding 5 ปีที่แล้ว

      @@9kmusic201 what's the video that contains the explanation of it?

  • @tweetyguy7347
    @tweetyguy7347 ปีที่แล้ว +1

    Bro thought he was coding in c++ for a second 13:25

  • @ijustleyxo609
    @ijustleyxo609 2 ปีที่แล้ว

    I suggest just passing on the CommandSender, Command, String label, and args[] directly from the parent command...

  • @delected
    @delected 5 ปีที่แล้ว +1

    damn ty