Fix holograms
This commit is contained in:
parent
4c0ca7008c
commit
2a3732fa83
8 changed files with 170 additions and 97 deletions
|
@ -5,7 +5,14 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="9d5d9b6f-43c8-41a4-bb42-a66ffc96c9b0" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/testentitylib/TestHologramsCommand.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/utils/Check.java" beforeDir="false" afterPath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/utils/Check.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/Hologram.java" beforeDir="false" afterPath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/Hologram.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java" beforeDir="false" afterPath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/ModernHologram.java" beforeDir="false" afterPath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/ModernHologram.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/test-plugin/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/test-plugin/build.gradle" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/testentitylib/TestEntityLibPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/testentitylib/TestEntityLibPlugin.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -34,37 +41,7 @@
|
|||
</task>
|
||||
<projects_view>
|
||||
<tree_state>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="EntityLib" type="f1a62948:ProjectNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="EntityLib" type="f1a62948:ProjectNode" />
|
||||
<item name="test-plugin" type="2d1252cf:ModuleNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="EntityLib" type="f1a62948:ProjectNode" />
|
||||
<item name="test-plugin" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="EntityLib" type="f1a62948:ProjectNode" />
|
||||
<item name="test-plugin" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
<item name="run paper" type="c8890929:TasksNode$1" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
|
||||
<item name="EntityLib" type="f1a62948:ProjectNode" />
|
||||
<item name="test-plugin" type="2d1252cf:ModuleNode" />
|
||||
<item name="Tasks" type="e4a08cd1:TasksNode" />
|
||||
<item name="run task shared" type="c8890929:TasksNode$1" />
|
||||
</path>
|
||||
</expand>
|
||||
<expand />
|
||||
<select />
|
||||
</tree_state>
|
||||
</projects_view>
|
||||
|
@ -106,51 +83,51 @@
|
|||
<option name="showExcludedFiles" value="false" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"Downloaded.Files.Path.Enabled": "false",
|
||||
"Gradle.Build EntityLib.executor": "Run",
|
||||
"Gradle.EntityLib [dependencies].executor": "Run",
|
||||
"Gradle.EntityLib [publish].executor": "Run",
|
||||
"Gradle.EntityLib [runServer] (1).executor": "Run",
|
||||
"Gradle.EntityLib [runServer].executor": "Run",
|
||||
"Gradle.EntityLib:code-gen [:code-gen:Main.main()].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanAllRunTaskCaches].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanCustomServiceCaches].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanPaperCache].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanPaperPluginsCache].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [publish].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [runServer].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [shadowJar].executor": "Run",
|
||||
"JAR Application.Unnamed.executor": "Run",
|
||||
"Repository.Attach.Annotations": "false",
|
||||
"Repository.Attach.JavaDocs": "false",
|
||||
"Repository.Attach.Sources": "false",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "master",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"jdk.selected.JAVA_MODULE": "corretto-17",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "/home/tofaa/Github/EntityLib/model-engine-addon",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.15",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"settings.editor.selected.configurable": "preferences.editor",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"Downloaded.Files.Path.Enabled": "false",
|
||||
"Gradle.Build EntityLib.executor": "Run",
|
||||
"Gradle.EntityLib [dependencies].executor": "Run",
|
||||
"Gradle.EntityLib [publish].executor": "Run",
|
||||
"Gradle.EntityLib [runServer] (1).executor": "Run",
|
||||
"Gradle.EntityLib [runServer].executor": "Run",
|
||||
"Gradle.EntityLib:code-gen [:code-gen:Main.main()].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanAllRunTaskCaches].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanCustomServiceCaches].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanPaperCache].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [cleanPaperPluginsCache].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [publish].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [runServer].executor": "Run",
|
||||
"Gradle.EntityLib:test-plugin [shadowJar].executor": "Run",
|
||||
"JAR Application.Unnamed.executor": "Run",
|
||||
"Repository.Attach.Annotations": "false",
|
||||
"Repository.Attach.JavaDocs": "false",
|
||||
"Repository.Attach.Sources": "false",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "master",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"jdk.selected.JAVA_MODULE": "corretto-17",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "D:/Github/EntityLib",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.15",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"settings.editor.selected.configurable": "preferences.editor",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
},
|
||||
"keyToStringList": {
|
||||
"kotlin-gradle-user-dirs": [
|
||||
"/home/tofaa/.gradle"
|
||||
"keyToStringList": {
|
||||
"kotlin-gradle-user-dirs": [
|
||||
"/home/tofaa/.gradle"
|
||||
]
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/model-engine-addon" />
|
||||
|
@ -313,8 +290,8 @@
|
|||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-jdk-9f38398b9061-18abd8497189-intellij.indexing.shared.core-IU-241.14494.240" />
|
||||
<option value="bundled-js-predefined-1d06a55b98c1-74d2a5396914-JavaScript-IU-241.14494.240" />
|
||||
<option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.15989.150" />
|
||||
<option value="bundled-js-predefined-1d06a55b98c1-91d5c284f522-JavaScript-IU-241.15989.150" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
|
@ -408,6 +385,7 @@
|
|||
<workItem from="1716488324710" duration="3710000" />
|
||||
<workItem from="1716722129881" duration="965000" />
|
||||
<workItem from="1716926795264" duration="1000" />
|
||||
<workItem from="1718023888535" duration="1738000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
@ -428,7 +406,7 @@
|
|||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java</url>
|
||||
<line>33</line>
|
||||
<line>42</line>
|
||||
<option name="timeStamp" value="3" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
|
|
|
@ -5,6 +5,7 @@ import org.jetbrains.annotations.NotNull;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
@ -14,6 +15,18 @@ public final class Check {
|
|||
|
||||
private Check() {}
|
||||
|
||||
|
||||
public static <T> void arrayLength(List<T> lines, int index, T e) {
|
||||
if (index >= lines.size()) {
|
||||
for (int i = lines.size(); i < index; i++) {
|
||||
lines.add(null);
|
||||
}
|
||||
lines.add(e);
|
||||
}
|
||||
else {lines.set(index, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Contract("null, _ -> fail")
|
||||
public static void notNull(@Nullable Object object, @NotNull String reason) {
|
||||
if (Objects.isNull(object)) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package me.tofaa.entitylib.wrapper.hologram;
|
||||
|
||||
import com.github.retrooper.packetevents.protocol.player.User;
|
||||
import com.github.retrooper.packetevents.protocol.world.Location;
|
||||
import me.tofaa.entitylib.meta.display.TextDisplayMeta;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
@ -7,24 +8,26 @@ import org.jetbrains.annotations.NotNull;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public interface Hologram<W> {
|
||||
public interface Hologram {
|
||||
|
||||
static <C> Hologram.@NotNull Legacy<C> legacy(@NotNull Location location) {
|
||||
return new LegacyHologram<>(location);
|
||||
static Hologram.@NotNull Legacy legacy(@NotNull Location location) {
|
||||
return new LegacyHologram(location);
|
||||
}
|
||||
|
||||
static <C> Hologram.@NotNull Legacy<C> legacy(@NotNull Location location, List<Component> lines) {
|
||||
return new LegacyHologram<>(location, lines);
|
||||
static Hologram.@NotNull Legacy legacy(@NotNull Location location, List<Component> lines) {
|
||||
return new LegacyHologram(location, lines);
|
||||
}
|
||||
|
||||
static <C> Hologram.@NotNull Modern<C> modern(@NotNull Location location) {
|
||||
return new ModernHologram<>(location);
|
||||
|
||||
static Hologram.@NotNull Modern modern(@NotNull Location location) {
|
||||
return new ModernHologram(location);
|
||||
}
|
||||
|
||||
static <C> Hologram.@NotNull Modern<C> modern(@NotNull Location location, List<Component> lines) {
|
||||
return new ModernHologram<>(location, lines);
|
||||
static Hologram.@NotNull Modern modern(@NotNull Location location, List<Component> lines) {
|
||||
return new ModernHologram(location, lines);
|
||||
}
|
||||
|
||||
@NotNull Location getLocation();
|
||||
|
@ -44,13 +47,18 @@ public interface Hologram<W> {
|
|||
|
||||
void addLine(@Nullable Component line);
|
||||
|
||||
interface Modern<W> extends Hologram<W> {
|
||||
void addViewer(@NotNull UUID viewer);
|
||||
default void addViewer(@NotNull User user) {
|
||||
addViewer(user.getUUID());
|
||||
}
|
||||
|
||||
interface Modern extends Hologram {
|
||||
|
||||
// I got too lazy
|
||||
void setModifier(@NotNull Consumer<TextDisplayMeta> consumer);
|
||||
|
||||
}
|
||||
interface Legacy<W> extends Hologram<W> {
|
||||
interface Legacy extends Hologram {
|
||||
|
||||
float getLineOffset(boolean marker);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
|
|||
import com.github.retrooper.packetevents.protocol.world.Location;
|
||||
import me.tofaa.entitylib.EntityLib;
|
||||
import me.tofaa.entitylib.meta.other.ArmorStandMeta;
|
||||
import me.tofaa.entitylib.utils.Check;
|
||||
import me.tofaa.entitylib.wrapper.WrapperEntity;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -11,11 +12,12 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
final class LegacyHologram<W> implements Hologram.Legacy<W> {
|
||||
final class LegacyHologram implements Hologram.Legacy {
|
||||
|
||||
private Location location;
|
||||
private List<WrapperEntity> lines = new ArrayList<>(3);
|
||||
private final List<WrapperEntity> lines = new ArrayList<>(3);
|
||||
private float lineOffset = -0.9875f;
|
||||
private float markerOffset = -0.40625f;
|
||||
private boolean marker;
|
||||
|
@ -31,6 +33,13 @@ final class LegacyHologram<W> implements Hologram.Legacy<W> {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewer(@NotNull UUID viewer) {
|
||||
for (WrapperEntity line : lines) {
|
||||
line.addViewer(viewer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMarker() {
|
||||
return marker;
|
||||
|
@ -95,7 +104,7 @@ final class LegacyHologram<W> implements Hologram.Legacy<W> {
|
|||
meta.setHasNoGravity(true);
|
||||
meta.setSmall(true);
|
||||
meta.setMarker(marker);
|
||||
this.lines.set(index, e);
|
||||
Check.arrayLength(lines, index, e);
|
||||
e.spawn(location);
|
||||
teleport(location);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
|
|||
import com.github.retrooper.packetevents.protocol.world.Location;
|
||||
import me.tofaa.entitylib.EntityLib;
|
||||
import me.tofaa.entitylib.meta.display.TextDisplayMeta;
|
||||
import me.tofaa.entitylib.utils.Check;
|
||||
import me.tofaa.entitylib.wrapper.WrapperEntity;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -11,13 +12,15 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class ModernHologram<W> implements Hologram.Modern<W> {
|
||||
final class ModernHologram implements Hologram.Modern {
|
||||
|
||||
private Location location;
|
||||
private List<WrapperEntity> lines = new ArrayList<>(3);
|
||||
private final List<WrapperEntity> lines = new ArrayList<>(3);
|
||||
private Consumer<TextDisplayMeta> modifier;
|
||||
private boolean spawned = false;
|
||||
|
||||
ModernHologram(@NotNull Location location) {
|
||||
this.location = location;
|
||||
|
@ -36,6 +39,7 @@ final class ModernHologram<W> implements Hologram.Modern<W> {
|
|||
line.spawn(location);
|
||||
}
|
||||
teleport(location);
|
||||
spawned = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -43,6 +47,7 @@ final class ModernHologram<W> implements Hologram.Modern<W> {
|
|||
for (WrapperEntity line : lines) {
|
||||
line.despawn();
|
||||
}
|
||||
spawned = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,10 +77,14 @@ final class ModernHologram<W> implements Hologram.Modern<W> {
|
|||
meta.setInvisible(true);
|
||||
meta.setHasNoGravity(true);
|
||||
meta.setText(line);
|
||||
this.modifier.accept(meta);
|
||||
this.lines.set(index, e);
|
||||
e.spawn(location);
|
||||
teleport(location);
|
||||
if (this.modifier != null) {
|
||||
this.modifier.accept(meta);
|
||||
}
|
||||
Check.arrayLength(lines, index, e);
|
||||
if (spawned) {
|
||||
e.spawn(location);
|
||||
teleport(location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -83,6 +92,13 @@ final class ModernHologram<W> implements Hologram.Modern<W> {
|
|||
setLine(lines.size(), line);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewer(@NotNull UUID viewer) {
|
||||
for (WrapperEntity line : lines) {
|
||||
line.addViewer(viewer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int length() {
|
||||
|
|
|
@ -34,7 +34,7 @@ dependencies {
|
|||
compileOnly('org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT')
|
||||
compileOnly('com.github.retrooper.packetevents:spigot:2.3.0')
|
||||
// implementation(project(":platforms:spigot"))
|
||||
implementation("com.github.Tofaa2.EntityLib:spigot:2.2.0-SNAPSHOT")
|
||||
implementation(project(":platforms:spigot"))
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ public class TestEntityLibPlugin extends JavaPlugin {
|
|||
commandMap = (CommandMap) Bukkit.getServer().getClass().getMethod("getCommandMap").invoke(Bukkit.getServer());
|
||||
commandMap.register("testapi", new TestTextDisplayCommand());
|
||||
commandMap.register("testplayer", new TestPlayerCommand());
|
||||
commandMap.register("testholo", new TestHologramsCommand());
|
||||
}
|
||||
catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package me.tofaa.testentitylib;
|
||||
|
||||
import io.github.retrooper.packetevents.util.SpigotConversionUtil;
|
||||
import me.tofaa.entitylib.wrapper.hologram.Hologram;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.defaults.BukkitCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class TestHologramsCommand extends BukkitCommand {
|
||||
|
||||
|
||||
TestHologramsCommand () {
|
||||
super("testholo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(@NotNull CommandSender commandSender, @NotNull String s, @NotNull String[] strings) {
|
||||
if (strings.length == 0) {
|
||||
commandSender.sendMessage("Usage: /testholo <legacy|modern>");
|
||||
return true;
|
||||
}
|
||||
Player player = (Player) commandSender;
|
||||
if (strings[0].equalsIgnoreCase("modern")) {
|
||||
Hologram.Modern holo =Hologram.modern(SpigotConversionUtil.fromBukkitLocation(player.getLocation()));
|
||||
holo.addLine(Component.text("Hello, World!"));
|
||||
holo.show();
|
||||
holo.addViewer(player.getUniqueId());
|
||||
}
|
||||
if (strings[0].equalsIgnoreCase("legacy")) {
|
||||
Hologram.Legacy holo = Hologram.legacy(SpigotConversionUtil.fromBukkitLocation(player.getLocation()));
|
||||
holo.addLine(Component.text("Hello, World!"));
|
||||
holo.show();
|
||||
holo.addViewer(player.getUniqueId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException {
|
||||
return Arrays.asList("legacy", "modern");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue