Git Product home page Git Product logo

kotlin-papermc-template's Introduction

kotlingradlepaper

A template for PaperMC plugins using Gradle + Kotlin

Usage

Cloning

  1. Click the green "Use this template" button at the top of the page
  2. Name your repository
  3. Clone the repository using git clone
  4. Open the project in IntelliJ

Customizing

  • To change the default module name, change the rootProject.name property in settings.gradle.kts
  • After renaming the default package (io.jcurtis.kotlinexample), you must also update the plugin.yml file to reflect the new path to the main class

Building

  1. Run gradle build
  2. Two .jar files will be made under the build/libs directory. One ends with -all, and the other does not. You should almost always use the one ending in -all (see below)
  3. Drag and drop the .jar file into your server's plugins directory

About

I created this after struggling for days with getting Kotlin to work properly with Paper/Spigot. This is an almost foolproof setup.

I'd like to note that I am by no means a professional at using Gradle. This might not be the best way to do things, but it works great for me.

-all vs non--all

If you have another plugin also written in Kotlin, and you would like to depend on it, use the .jar file that does not contain -all in the name. This is because the -all file contains all of the Kotlin dependencies, which will conflict with the other plugin's dependencies.

Special thanks

I want to thank the people on the PaperMC Discord server for helping me get this going. I probably would be left banging my head against a wall if they didn't help!

kotlin-papermc-template's People

Contributors

jcurtis06 avatar

Stargazers

 avatar Ben avatar enty avatar  avatar Pierre avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.