Resource (ACF - BETA) Annotation Command Framework

Discussion in 'Spigot Plugin Development' started by Aikar, Apr 19, 2017.

  1. Sooo.... Could anyone help me please.
     
    • Funny Funny x 1
  2. electronicboy

    IRC Staff

    Looks like you're not shading in the plugin properly? You're seemingly missing the default translation files, also, make sure that you use
     
  3. Thing is it only happens for one person, everyone else doesn't have this issues. Could it be that he is hosting his server from his pc?
     
  4. Is there a way to use a string with multiple arguments? I know how to do it without ACF but how do I do it with ACF?
     
  5. simpleauthority

    Supporter

    Can you expand upon that? What do you mean?
     
  6. So If someone was to write a message (example not what I'm trying to do) /warn <player> <reason> so it would be like /warn Splodgebox for being rude
     
  7. electronicboy

    IRC Staff

    Just using String as the last argument will make it deal with that, you can use [USER=450784]@Single[/USER] (This website hates me, attempt 3...) to make it only read a single arg
     
    • Funny Funny x 1
  8. Alright thanks
     
  9. pushed slew of updates last night
    1) fixed a bug that probably broke Paper Async Tab Completion

    2) permissions on /root commands should now be implemented more reliably so that if a player doesn't have access to any subcommand, they shouldn't see it in tab, where as before it was iffy (it had some setting if the class file itself had a permission defined but it wasn't 'right'), but now it should be fairly logical on handling. bungee is still iffy due to bungee being limited on API for this.

    3) fixed a bug per discussion with @TehNeon for CommandCompletionContext#getContextValue incorrectly parsing too many args, but that would only be applicable to you if you implement contextual completion handlers which is pretty advanced.

    and incase you are not on Discord, fixed overall Paper Async Tab Completion issues
     
  10. @Splodgebox build script? did you happen to relocate "co.aikar.timings" instead of "co.aikar.timings.lib"?
     
  11. Code (Text):
    buildscript {
        repositories {
            jcenter()
        }

        dependencies {
            classpath "com.github.jengelman.gradle.plugins:shadow:2.0.2"
        }
    }


    plugins {
        id 'net.ltgt.apt' version '0.10'
    }
    apply plugin: "com.github.johnrengelman.shadow"
    apply plugin: 'java'

    group = pluginGroup
    version = pluginVersion

    sourceCompatibility = 1.8
    targetCompatibility = 1.8


    repositories {
        mavenCentral()
        maven {
            name = 'spigotmc-repo'
            url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
        }
        maven {
            name = 'sonatype'
            url = 'https://oss.sonatype.org/content/groups/public/'
        }
        flatDir {
            dirs './/Spigot'
        }
        maven {
            url "http://repo.extendedclip.com/content/repositories/placeholderapi/"
        }
        maven {
            url = "https://repo.aikar.co/content/groups/aikar/"
        }
        maven {
            url = "https://hub.spigotmc.org/nexus/content/groups/public/"
        }
        maven {
            url 'https://jitpack.io'
        }
    }

    compileJava {
        options.compilerArgs += ["-parameters"]
        options.fork = true
        options.forkOptions.executable = 'javac'
    }

    dependencies {
        testCompile group: 'junit', name: 'junit', version: '4.12'
        compileOnly 'org.projectlombok:lombok:1.18.0'
        compileOnly 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT'
        apt "org.projectlombok:lombok:1.18.0"
        compileOnly name: 'Factions'
        compileOnly name: 'worldguard'
        compileOnly name: 'worldedit'
        compileOnly name: 'spigot'
        compileOnly name: 'TacoSpigot'
        compileOnly name: 'Vault'
        compileOnly 'me.clip:placeholderapi:2.9.2'
        compile "co.aikar:acf-core:0.5.0-SNAPSHOT"
        compile "co.aikar:acf-paper:0.5.0-SNAPSHOT"
    }

    shadowJar {
        relocate 'co.aikar.commands', 'net.splodgebox.cosmic.acf'
    }

    import org.apache.tools.ant.filters.ReplaceTokens

    processResources {
        from(sourceSets.main.resources.srcDirs) {
            filter ReplaceTokens, tokens: [version: version]
        }
    }

    build.dependsOn shadowJar
     
  12. electronicboy

    IRC Staff

    You need to relocate the timings library too, otherwise it will cause issues for people using plugins which have different versions of the timings library, relocate `co.aikar.timings.lib`
     
  13. Okay, do I remove relocate 'co.aikar.commands', 'net.splodgebox.cosmic.acf'
     
  14. electronicboy

    IRC Staff

    Nope, you still need to relocate ACF, you just also need to relocate the timings library
     
  15. alright thanks
     
  16. hmm ACF is suppose to relocate that itself, but is commonly broken by people decide to choose to relocate all of my namespace or just timings (without me saying to)

    though it is possible that due to the way I have acf artifacts setup (to avoid duping) that the relocates aren't being carried :/

    ideally I want the acf jar that bundles minecraft-timings to already have it relocated.
     
  17. So it's enough to relocate co.aikar.commands?

    I just want to make sure I do it the right way before releasing the next update. :D
     
  18. Hey, Sorry for the mass amount of questions I have about this :ROFLMAO:

    Is it possible to remove this message?
    Code (Text):
    [ACF] Minecraft Version: 1.8
     
    #300 Splodgebox, Feb 16, 2019 at 2:06 PM
    Last edited: Feb 16, 2019 at 2:55 PM

Share This Page