Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script fails to load when @DependsOn is used. #3

Open
wispoffates opened this issue Sep 22, 2020 · 0 comments
Open

Script fails to load when @DependsOn is used. #3

wispoffates opened this issue Sep 22, 2020 · 0 comments

Comments

@wispoffates
Copy link

  1. Documentation needs updated took me a bit of digging to find that @file:Maven was replaced with @file:DependsOn.

  2. The below error is encountered when compiling a script with @file:DependsOn is used. Removing the @file:DependsOn fixes the compile but breaks the editor being able to find the dependent classes.

image

@file:Repository("https://hub.spigotmc.org/nexus/content/groups/public/")
@file:Repository("https://jitpack.io")

@file:DependsOn("org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT")
//@file:DependsOn("com.github.Ste3et:FurnitureLib:961dd50cb2")

command("ssrod16") {
    executor {
        sender.sendMessage("Giving sunshine rod 16 to " + sender.name)
        val rod = ItemStack(Material.STICK)
        val meta = rod.itemMeta
        meta.setDisplayName("SunshineRod")
        meta.setLore(listOf(ChatColor.RED + "ssrod16"))
        rod.setItemMeta(meta)

        (sender as Player).inventory.addItem(rod)
    }
}

event<BlockBreakEvent> {
    this.player.sendMessage("You broke a block! :: " + this.block.type)
}

event<PlayerRiptideEvent> {
    this.player.sendMessage("Woo riptide.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant