Skip to content
Aki edited this page Jul 11, 2018 · 2 revisions

The @LPackage annotation differs slightly from the @LClassfile, @LField and @LMethod annotation. While the latter must be attached to any value that exists in CraftBukkit, the @LPackage annotation is only necessary if you want to rename a package.

Let's say we've got the package foo.bar. It should be named foo.fizz in CraftBukkit 1.11 and foo.buzz in 1.12.

This can be achieve by annotating the package-info.java of the package foo.bar:

@LPackage(version = V1_11_R1, name = "fizz")
@LPackage(version = V1_12_R1, name = "buzz")
package foo.bar;

import static net.glowstone.linkstone.annotations.Version.*;
import net.glowstone.linkstone.annotations.*;

Using dots in package names

Here we've got the package net.minecraft.server.
For version 1.11 it should be called net.minecraft.server.v1_11_R1.
For version 1.12 it will be called net.minecraft.server.v1_12_R1.

@LPackage(version = V1_11_R1, name = "server.v1_11_R1")
@LPackage(version = V1_12_R1, name = "server.v1_12_R1")
package net.minecraft.server;