Minecraft Plugin Tutorial (in Kotlin) | Project Setup

Sdílet
Vložit
  • čas přidán 8. 06. 2024
  • Learn how to make a 1.19/1.18 plugin for Minecraft Paper/Spigot/Bukkit servers... with Kotlin (or Java, if you want)! You'll make a small "hello world" program and set up an empty project in IntelliJ IDEA.
    INSTRUCTIONS FOR NEWER VERSIONS (1.19+):
    At 9:05: Use the latest version from here papermc.io/using-the-api
    At 7:14: Change the api-version to your desired version (e.g. 1.19)
    Don't forget to reload Maven!
    If you're curious about Java vs. Kotlin, here's a comparison from the Kotlin website: kotlinlang.org/docs/compariso...
    Patreon: / legitimoose
    Discord: / discord
    Twitter: / legitimoose
    IntelliJ Idea: www.jetbrains.com/idea/download/
    Java's Package Name Rules: docs.oracle.com/javase/specs/...
    Latest Paper API Version: papermc.io/using-the-api
    === Timestamps ===
    0:00 - Intro
    0:21 - Download IntelliJ IDEA
    0:38 - Create a Project
    1:43 - What are GroupId and ArtifactId?
    2:58 - More Project Settings
    3:57 - How to Hello World
    4:52 - How to Build a Plugin .JAR
    6:45 - Changing Name/Settings After Creation
    7:26 - Finished Project in Java
    7:32 - Converting to Kotlin
    8:28 - Updating to the Latest Version
    10:21 - I make a mistake (for educational purposes)
    10:46 - Unsolved Mysteries of Java Versioning?
    11:24 - Finish Converting to Kotlin
    In this video, you'll learn how to do project setup, set up a project, in IntelliJ IDEA for a Minecraft plugin/server-side mod. Bukkit plugins, spigot plugins, and paper plugins are for the most part, identical. Only slight feature changes have occured. Bukkit isn't used anymore, but its name lives on in the community. Spigot is older and not used very often in modern servers. It's what the newer, slicker, PaperSpigot is based on. PaperSpigot/PaperMC/Just Plain Ol Paper is what I use in this tutorial, and it's what you should always use (in most situations). This video serves to help you do the hardest part of plugin development, set up a project. Setting up a development environment for Paper plugins is very hard, and finding one for Kotlin in English is even harder (there are an abundance in German though, which is pretty funny). I actually watched one of those german tutorials to learn this. With auto-translate and everything lol. This is not keyword optimization, and idk why you'd be reading this far, so this story doesn't belong here, it's just funny. Ahem- Kotlin and Java are compatible with eachother, and this is a minecraft java plugin tutorial, as well as a minecraft plugin tutorial kotlin, as the cool kids might say. Kotlin is much more fun to write, and is great for mods and plugins. Wondering how to write a minecraft plugin in kotlin? You've come to the right place. Looking for a minecraft plugin tutorial in IntelliJ? Also the right place. Good luck on your minecraft plugin making journey, in version 1.18, 1.19, 1.20? This tutorial is from 2022 and still works. It should work for a long time and I'll update you if it doesn't. Hope you enjoy this minecraft plugin coding tutorial and that you learn how to make a plugin for minecraft 1.19/1.18. ~Metadata Soupsmith
  • Hry

Komentáře • 234

  • @GGGamesXDlol
    @GGGamesXDlol Před rokem +171

    1:08
    "today we're making a plugin, a spigot plugin, that's why we're going to select, paper"
    -Legitimoose 2022

    • @brainnotwrkin
      @brainnotwrkin Před rokem +1

      Paper is based on spigot

    • @GGGamesXDlol
      @GGGamesXDlol Před rokem +5

      @@brainnotwrkin ik but they are not the same thing, it's like saying "mobile phones are based on fixed telephones", that's true but the are not the same thing

    • @qanti6582
      @qanti6582 Před 4 měsíci

      @@GGGamesXDlolit's exactly the same wtf is u yapping about

    • @GGGamesXDlol
      @GGGamesXDlol Před 4 měsíci

      it takes ZERO effort to make a google search before saying something that doesn't make sense@@qanti6582

    • @J4yT3a
      @J4yT3a Před 4 měsíci +1

      @@qanti6582 no, they are not. moose explained it in the video.

  • @coolearth4511
    @coolearth4511 Před rokem +26

    For those of you who are coming to this video in 2023, you will need to change the platform from "Sponge" to "Bukkit" and select Paper as the initial screen with all the options for the platform is gone now

    • @SuitedGhost
      @SuitedGhost Před 9 měsíci

      was abouta comment that myself, thank you good sir

    • @alsobe3D
      @alsobe3D Před 2 měsíci +1

      i am coming in 2024....

  • @The10ie
    @The10ie Před 2 lety +35

    best plugin tutorial i've ever seen in my life! I would follow each tutorial he makes.

  • @frogger2920
    @frogger2920 Před 2 lety +36

    Finally another video! I would like to see more videos about minecraft shaders, I think it offers a lot more!

    • @kkfan7878
      @kkfan7878 Před rokem

      Yes

    • @TheJimmyCartel
      @TheJimmyCartel Před rokem +1

      I wouldn't say that. That's just a visual change. Plugins can really change your gameplay, that's how you can play on a hypixel server without downloading any client side mods. It's all plugins.

  • @oreiboon
    @oreiboon Před rokem +4

    Recently, I decided "Hey, I want to make plugins for a very funny server idea" (because the skript plugin just isn't it for me) and remembered this channel, lo and behold, I found this video. Overall, really great tutorial, enjoyed how you explained each step. Keep up the good work!

  • @oreonokamithecookie7727
    @oreonokamithecookie7727 Před rokem +12

    this man made me interested in coding only by himself huge fan

  • @LightslicerGP
    @LightslicerGP Před 2 lety +83

    OHMYGOD
    Legitemoose teaching us things nobody else wants to
    Thank you so much

  • @alexanderpoukhlovski
    @alexanderpoukhlovski Před rokem +1

    I never thought a tutorial could be so fun to watch! I would love to see some more of these, maybe about how to make a command work or something

  • @Legitimoose
    @Legitimoose  Před 2 lety +16

    At 9:05: Use the latest version from here papermc.io/using-the-api
    At 7:14: Change the api-version to your desired version (e.g. 1.19)
    Don't forget to reload Maven!

    • @MayankNotFound
      @MayankNotFound Před 2 lety +2

      Plz bring more episodes like building other types of plugin and more knowledge

    • @vithrn123
      @vithrn123 Před 2 lety

      bro finally i can find a tutorial of kotlin plugins for minecraft that isn't in german

    • @privatechannel1272
      @privatechannel1272 Před 2 lety

      Why don't just use Visual Studio?

    • @vithrn123
      @vithrn123 Před 2 lety

      @@privatechannel1272 like he said in the video since jetbrains made kotlin the easiest way to convert java to kotlin while coding is with jetbrain's Intelij

    • @pancakehiatt
      @pancakehiatt Před 2 lety

      @@vithrn123 except not cause he just says to figure it out yourself in the end smh

  • @omrishamir6038
    @omrishamir6038 Před 2 lety +3

    My guy is back! These videos really help me! Keep it going buddy!😀

  • @cipher4921
    @cipher4921 Před 11 měsíci

    Love how your able to teach but yet make it entertaining so that it doesn't sound like a robot teaching or showing how to do the lesson.

  • @Psyan
    @Psyan Před rokem

    you make the most fun and entertaining coding tutorials i've ever seen, keep it up :DDD

  • @wbrim
    @wbrim Před rokem

    Thanks to you, I was able to add new features to and existing plugin, compile it and contribute to the main repo ✨

  • @juddery
    @juddery Před rokem +63

    As a software developer myself but someone who has never tried developing a Minecraft plugin before, I'm definitely digging that sense of humour you've got going there. 😁 Java was the first language I ever learned, but haven't touched it in over 10 years, so this should be err... fun?

    • @SnowyRedstone
      @SnowyRedstone Před rokem +4

      welp I learned to code Java last summer, coded some fabric mods, but once I realized how easy coding a datapack is, lets just say that I haven't used intellij in a long time

  • @setremike1754
    @setremike1754 Před 7 měsíci +3

    please a new tutorial that is updated in intellij idea please

  • @dev_insights101
    @dev_insights101 Před 2 lety +5

    To everyone watching this without any knowledge of java: I would recommend to learn little bit of java. Things such as project managers and some code syntax and also how IDE wok.

  • @gttmone
    @gttmone Před rokem

    Best up to date tutorial for Minecraft Plugins & Java In General Thank you ♥

  • @pointyposeidon
    @pointyposeidon Před rokem +4

    Hope to see some more videos on Minecraft modding with Kotlin! Great work

  • @MellowMustard
    @MellowMustard Před rokem

    I looked for a video like this for 2 weeks.. thank you so much

  • @kaninchenspeed
    @kaninchenspeed Před 2 lety +5

    changing the java version in the pom.xml file allows the use of newer java features

  • @officialzeroninja
    @officialzeroninja Před rokem +1

    This video is great. Would like to see another one where you show how to make a simple plugin like adding a command or something :)

  • @fredde200
    @fredde200 Před 2 lety

    how long i've waited for this

  • @eremianovac5342
    @eremianovac5342 Před rokem

    This is why I am subbed to this dude

  • @NateAustin19
    @NateAustin19 Před rokem

    love the charisma coming out of you my friend! 😂

  • @yrus7802
    @yrus7802 Před rokem

    Wow I am amazed by how this tutorial is good

  • @Terraspark4941
    @Terraspark4941 Před rokem

    sir i have no idea who you are and how you appeared in my recommendeds, but ive already subscribed to you, keep up the good work 👍

  • @GGGamesXDlol
    @GGGamesXDlol Před rokem +1

    This only video was better than the 19283827382 other guides in CZcams together XD

  • @CodeCreature
    @CodeCreature Před 2 lety +2

    Started learning code in Java... I will probably never choose to use that language again! 😅Great tutorial!

  • @100PercentANerd
    @100PercentANerd Před rokem

    I love how I'm just opening the app when legitimoose is putting the plugin on the server

  • @thedoopa3169
    @thedoopa3169 Před rokem

    I like this guy. Made coding fun with his energy

  • @maxtb8481
    @maxtb8481 Před rokem +9

    could you do more videos on plugins as well as datapacks? you're very good at explaining btw

  • @GGGamesXDlol
    @GGGamesXDlol Před rokem +1

    ur channel is very underrated

  • @czebosak
    @czebosak Před rokem +1

    Thanks legitimoose, very cool

  • @cussy7526
    @cussy7526 Před rokem +1

    Me alegra mejorar mi nivel de inglés, así descubro joyas como este canal XD

  • @Ysancharo
    @Ysancharo Před rokem

    I just tried to watch a video before this with the same program, this is SOOO much easier

  • @paw1gaming
    @paw1gaming Před 2 lety +1

    Legitimoose uploaded 😱

  • @pogfrog2388
    @pogfrog2388 Před 2 lety +1

    Hey mate, thanks for all the awesome videos! Wondering if u can make a loot table and advancement video for datapacks.

    • @billybillington5340
      @billybillington5340 Před 2 lety +1

      There is a great loot table tutorial by someone named Sir Roman

  • @wusi9422
    @wusi9422 Před 2 lety

    i love this content and ily

  • @wahidislamlinad
    @wahidislamlinad Před rokem

    sooo much underrated ngl

  • @BluePotatoBP
    @BluePotatoBP Před rokem

    I'm 90% sure the reason stuff breaks when you use a space in the actual file name is because windows/whatever program you're using doesn't recognize it as a valid directory, for example:
    To access a folder on your desktop named "Funny Project" you basically have to think about it as if you were using a terminal- **cd C:\Users\User\Desktop\Funny Project**
    And if you've ever tried that, you would get an error. ("The system cannot find the path specified.")
    That's why you might see people use quotes after **cd**, so **cd "C:\Users\User\Desktop\Funny Project"** actually works.
    This is also implemented into tab completion in terminals, if you try writing **cd(space)** and then pressed tab you can occasionally get directories surrounded in quotes.
    Hope this helped!

  • @Brob3r
    @Brob3r Před 2 lety +5

    Can you pls make a forge/fabric mod tutorial?
    Btw I have watched your videos since you had like 8k subs so congratulations!

    • @drakefruit
      @drakefruit Před rokem +4

      you should really use fabric

    • @Brob3r
      @Brob3r Před rokem +2

      @@drakefruit right

  • @randomidiot34
    @randomidiot34 Před rokem

    BRO SAVED MY LIFE

  • @torge2232
    @torge2232 Před rokem +1

    About the "Unsolved Mysteries of Java Versioning".
    My understanding is that newer Java JVMs are backwards compatible. So for example a JVM with Java version 17 can run code written for Java version "1.8". Although a JVM with the version 1.8 can't run code written for newer Java versions, because it lacks the new features.
    This might not be a 100% correct, because I just wrote that of the top of my head.

  • @CraftBlack
    @CraftBlack Před 9 měsíci +1

    Thanks! 🥰

  • @popbob4780
    @popbob4780 Před 2 lety

    Bruh I literally just searched for coding Minecraft stuff in kotlin out of interest and I noticed you uploaded a vid on that

  • @MinerBruh
    @MinerBruh Před 2 lety +6

    Just create more plugin tutorials, when u made the datapack tutorials, i loved it so yes more plugin tutorials like on HOW to make the player fly or smth

  • @jonathankrzeszewski9010
    @jonathankrzeszewski9010 Před 9 měsíci +3

    to anyone struggling to find the community edition, IntelliJ sort of hid it on their webpage, you need to click show other versions on the download link provided

  • @yusus_
    @yusus_ Před rokem +1

    do i want to make a plugin: no
    am i watching: yes

  • @zjh_lol6926
    @zjh_lol6926 Před rokem +1

    can you make a plugin on basic gui opener but pls make more other plugin tutorials too

  • @HxppyFan
    @HxppyFan Před rokem

    Thx for helping! But what about to explain how to detect some of events player? Just like for flying (double jump)?

  • @kedersiz8600
    @kedersiz8600 Před rokem

    Hey thank you so much I had to past with python no I can learn kotlin this will be good for plugins because I checked there was a script plugin for JavaScript and python or many people said it was laggy and it lacks the features

  • @wal937
    @wal937 Před 2 lety

    yessir plugin tutorial

  • @crola7169
    @crola7169 Před rokem

    pretty sure the pom.xml java version is useful when you are building via maven, to do so you would need to delegate build and run tasks to maven in intellij, however these steps are not required in this case everything works, and if everything works then there is no need to mess with it

  • @b_mbyz
    @b_mbyz Před 2 lety

    thanks man!!

  • @LMC.AudiusParty
    @LMC.AudiusParty Před rokem

    please do more ! please is possible to make something where you take an open-source project and contribute to it ? thanks for any answer!!!

  • @blakedoesmc
    @blakedoesmc Před rokem +1

    wouldve loved to see a plugin made i got it all setup but theres no tutorials out there for paper kotlin syntax development (that are in english anyway that i can find) i was hoping to build a /fly plugin for my sever to test this but now i'm lost with a hello world plugin that i cant even see in game

  • @Elektroeule
    @Elektroeule Před rokem

    Thank you

  • @lolmaybe8092
    @lolmaybe8092 Před rokem

    BRUUUUH!!! Why this video is underrated? It shouldn't be like that(

  • @AlphaFennec
    @AlphaFennec Před rokem

    Haiya peep, just wondering if you could possibly make a extension to this video talking about how to make something simple like an object that gives you speed when you right click on it. I found this video really helpful and was wondering if you could do that if it's not too much trouble and such. Thankes!

  • @JanBebendorf
    @JanBebendorf Před 4 měsíci

    Well instead of setting up an IDEA artifact you could've just expanded the maven goals on the right and double-click package. This will create a new maven run that will package your jar for you and is more universal than IDEA artifacts

  • @Skys9
    @Skys9 Před 2 lety +1

    Kotlin yes finally

  • @hinterhaeltiger
    @hinterhaeltiger Před rokem

    you can build the artifact in the maven tab

  • @xakair6983
    @xakair6983 Před rokem

    We need more

  • @TuttuTheDog
    @TuttuTheDog Před 2 lety

    the moose is back again

  • @LateralOrc69977
    @LateralOrc69977 Před rokem +1

    so what is the extreme fly part??? i dont know java

  • @liebertmusic
    @liebertmusic Před rokem +1

    yeah I am out on 4:42 . In my case "msg" is red and is flagged as an error.

  • @pkcrispybread1356
    @pkcrispybread1356 Před rokem

    I want to know about finding entity positions and replacing blocks

  • @robbingjack8278
    @robbingjack8278 Před rokem +1

    i want to smash my head seeing this and how hard and remember it is to know

  • @CyaneousSnake
    @CyaneousSnake Před 5 měsíci

    Sir
    Thank you

  • @AcornGR
    @AcornGR Před rokem

    Bruh my subscription box hates me, I asked for this and you made it and CZcams didn’t even send it in the subscription box I looked at your channel right now and I found out I didn’t see two videos 💀

  • @MentallyBurdened
    @MentallyBurdened Před 10 měsíci

    9:19 this gave me a mental breakdown

  • @Log1eI3ear
    @Log1eI3ear Před 2 lety +2

    Please may you make a tutorial on adding custom music discs and, if you watch MCC, you will know that they have custom songs for each game. That is what I really want.

    • @DuckGoesViral
      @DuckGoesViral Před 2 lety +4

      i’m pretty sure you can do that with resource packs

    • @Guy-wd3yi
      @Guy-wd3yi Před rokem +1

      there's already a plugin for that search something like custom music disc plugin

  • @DrollerApollo13
    @DrollerApollo13 Před rokem +1

    I am trying to code my first minecraft plugin but all the videos I watch seem outdated. When using the minecraft developers plugin it never gives the option to use paper and go through the steps as shown in the video. Any help would be appreciated!!

    • @mrguny8715
      @mrguny8715 Před rokem

      Hi, if you still need help in order to select paper you neeed to select bukkit then you chose betwen paper and spigot, hope this helped

  • @magnuskjr-jensen2972
    @magnuskjr-jensen2972 Před rokem

    How do i download the JDK when i did like you said it says it dosent work, or specificly "Failed to prepare JDK installation to C:\Users\_____\.jdks\temurin-20.0.1" How do i fix this?

  • @waylonmorristexas4851

    Yeah I have no idea what to do from here so please make another

  • @QueueWithACapitalQ
    @QueueWithACapitalQ Před rokem

    Im wanting to get into making MC plugins, can you please make more amazing tutorials like this one?

  • @owopotato
    @owopotato Před rokem +1

    Is there any documentation on Paper/Spigot in Kotlin? Or any way to know how the java is converted without just guessing?

    • @Legitimoose
      @Legitimoose  Před rokem +1

      If you copy/paste complete java code into a Kotlin file, it will automatically ask if you want to convert it!

  • @athomesuperhero
    @athomesuperhero Před rokem

    Can you teach us how to make custom enchantments?

  • @foxiqval69
    @foxiqval69 Před rokem

    just to be clear, the java.version is only for some configuration if it was public, the jvm target tmk is also useless. i like to change it anyway cuz im a fan of doing dumb things

  • @SShac0
    @SShac0 Před rokem

    Im not even started it but i feel the pain like im coding in C# Json and fabric (a mod running thing like forge)and its still looks like super strange to me

  • @saltzus
    @saltzus Před 2 lety +1

    Can u make tutorial how to make plugin play music

  • @luckybeeyt
    @luckybeeyt Před rokem +1

    Will it work for 1.16.5?

  • @pancakehiatt
    @pancakehiatt Před 2 lety

    part 2? no one else made a tutorial for kotlin and papermc. they're all for spigot

  • @breadip
    @breadip Před rokem

    can you create new items by using this?

  • @user-qr1cs2zr7e
    @user-qr1cs2zr7e Před měsícem

    Does anyone know why the actual name of the project is in camelCase?

  • @xakair6983
    @xakair6983 Před 2 lety

    oh thats nice

  • @katekko1
    @katekko1 Před rokem

    Where s the maven? You can setup the maven to install through

  • @sweptt
    @sweptt Před rokem

    how do i make extremeplugin.class writeable.

  • @FlopByrger347
    @FlopByrger347 Před 5 měsíci

    it says that it couldn't loadthe plugin lol, maybe it's because i've put only a gigabite of rom

  • @vooodre2715
    @vooodre2715 Před rokem

    Absolutely loved your video! But I have a question. I searched the web for paper docs on Kotlin but there weren’t any that I could find. Could you tell me where I could find one? And also, can you just convert java code that’s in the docs to Kotlin and use it?

    • @Legitimoose
      @Legitimoose  Před rokem +1

      Paper is written in Java, so there are not Kotlin docs available. _However!_ Kotlin is meant to be interoperable with Java, so the answer to your second question is yes! You can use the Java docs, and the IDE will usually help you convert things to Kotlin. You can even copy/paste entire snippets into IDEA and it will automatically convert it to Kotlin. Hope this helps!

    • @vooodre2715
      @vooodre2715 Před rokem

      @@Legitimoose wow thanks!

  • @chickenmanfy
    @chickenmanfy Před rokem

    Please explain how to make commands in kotlin am beg

  • @stefanmadalincrivat8254

    Can you do a tutorial about a mod in wich you make a mob

  • @SamuraiDestroy
    @SamuraiDestroy Před rokem +1

    Y E E B O IIIIIIIIIIII
    PLUGIN TUTORIAL

  • @sullymlg9785
    @sullymlg9785 Před rokem

    1:20 Oh yeah - if you like redstone.. choose neither and learn fabric. (or choose paper but paper still makes redstone a bit jank)

  • @aka1021
    @aka1021 Před rokem

    Hi, KotlinEnjoyer here, I totally agree you saying Java is weird, especially setting up a hello world, you have to remember class public static void main String args, but in Kotlin, you only have to remember fun main, Kotlin is better then Java

  • @bubbagrenade
    @bubbagrenade Před rokem

    do you have to use kotlin?

  • @huetom4084
    @huetom4084 Před rokem

    Do you know, how it is possible, to execute code every tick in a plugin

    • @Legitimoose
      @Legitimoose  Před rokem

      Yes, you can "schedule" a BukkitRunnable to run every tick! Look up how BukkitRunnables/Runnables work and you should be good to go. (If you're trying to detect something like in a datapack though, you should use events for that instead.)

  • @BusterBrown1217
    @BusterBrown1217 Před rokem

    It would be nice to see how an experienced person goes through the documentation because it can be really confusing for people who don't know what they're doing (people like me)

    • @Legitimoose
      @Legitimoose  Před rokem

      that's a good idea lol. knowing how to read documentation is obviously very important, and people rarely show how to do it. maybe some kind of "let's code" could work, or just a good ol tutorial. thanks for the suggestion! (no promises I'll make it tho ;) )

  • @spitslotnet
    @spitslotnet Před rokem

    Isn’t it like normal to have a domain?

  • @dj8201
    @dj8201 Před 10 měsíci +1

    HELP! i cna't convert it to kotlin