Present adventure on compile time

Co-Authored-By: Hannes Greule <SirYwell@users.noreply.github.com>
This commit is contained in:
NotMyFault 2021-02-22 11:04:12 +01:00
parent 4a6af7182a
commit f5956b66a8
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 25 additions and 0 deletions

View File

@ -64,6 +64,13 @@ repositories {
includeGroup("de.notmyfault")
}
}
maven {
name = "OSS Sonatype Releases"
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
content {
includeGroup("net.kyori")
}
}
flatDir { dir(File("src/main/resources")) }
}
@ -107,6 +114,8 @@ dependencies {
exclude("com.sk89q.worldedit.worldedit-libs", "bukkit")
exclude("com.sk89q.worldedit.worldedit-libs", "core")
}
compileOnly("net.kyori:adventure-api:4.5.0")
testCompileOnly("net.kyori:adventure-api:4.5.0")
api("com.intellectualsites.paster:Paster:1.0.1-SNAPSHOT")
// Third party
implementation("org.bstats:bstats-bukkit:2.2.1")

View File

@ -15,6 +15,7 @@ import org.bukkit.persistence.PersistentDataContainer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@ -26,6 +27,21 @@ public class AsyncSign extends AsyncBlockState implements Sign {
private boolean isEditable = false;
@Override
public @NotNull List<net.kyori.adventure.text.Component> lines() {
throw new UnsupportedOperationException();
}
@Override
public net.kyori.adventure.text.@NotNull Component line(int index) throws IndexOutOfBoundsException {
throw new UnsupportedOperationException();
}
@Override
public void line(int index, net.kyori.adventure.text.@NotNull Component line) throws IndexOutOfBoundsException {
}
@Override
public String[] getLines() {
CompoundTag nbt = getNbtData();