Code Monkey home page Code Monkey logo

mcopts's Introduction

What?

MCOpts is a getopt / getopt_long / cli / bash oriented minecraft command parameter management api.

In short, this means your commands may look a little like this:

/#gen Tower -msr90 --gen natural_9i249u982 -d0 -x ~2

The library especially aims to eliminate redundant data (such as the same command usage in every single language file), and shorten common command argument processes.

This greatly reduces the susceptibility to errors and should save you time in the long run.

Getting Started

To add MCOpts as a dependency to your mod, add this to your build.gradle:

Up above

buildscript {

    dependencies {
        classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.0'
    }
}

apply plugin: 'com.github.johnrengelman.shadow'

Down below

dependencies {
    deobfCompile 'ivorius.mcopts:MCOpts:0.9' // Change the version accordingly, obviously
    // Find versions over at http://files.minecraftforge.net/maven/ivorius/mcopts/MCOpts/index.html
}

shadowJar {
    exclude 'META-INF/*', 'META-INF/maven/**'
    relocate 'ivorius.mcopts', project.group + '.shadow.mcopts'
    classifier=''
}

reobf {
    shadowJar { mappingType = 'SEARGE' }
}

tasks.build.dependsOn reobfShadowJar

Now, re-setup your workspace:

gradle setupDecompWorkspace

If you use IDEA, remember to refresh your gradle project too. You will need at least Gradle 3.0, so set up your gradle home correctly.

And that's it! MCOpts is now included in your jar.

Using MCOpts

Please refer to using MCOpts and adapting MCOpts.

License TL;DR

You are free to include the library using the steps above, which will automatically add all required files (license, notices) to your jar. If you modify it, you also have to include a changes file to outline roughly what you did.

Full TL;DR

mcopts's People

Contributors

ivorforce avatar jerryyoj 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.