Skip to content

Commit

Permalink
Update FancyNpcs & small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchlueter committed May 21, 2023
1 parent 57b0ecc commit 4f2b6d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ repositories {
}

dependencies {
paperweight.foliaDevBundle("1.19.4-R0.1-SNAPSHOT")

implementation("com.github.FancyMcPlugins:FancyLib:f2a7b13071")
compileOnly("de.oliver:FancyNpcs:1.1.5-beta")
compileOnly("de.oliver:FancyNpcs:1.1.5")

compileOnly("me.clip:placeholderapi:2.11.3")
compileOnly("io.github.miniplaceholders:miniplaceholders-api:2.1.0")
paperweight.foliaDevBundle("1.19.4-R0.1-SNAPSHOT")
}

tasks {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/oliver/fancyholograms/Hologram.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.mojang.math.Transformation;
import de.oliver.fancyholograms.events.HologramSpawnEvent;
import de.oliver.fancylib.ReflectionUtils;
import de.oliver.fancynpcs.Npc;
import de.oliver.fancynpcs.utils.ReflectionUtils;
import io.github.miniplaceholders.api.MiniPlaceholders;
import io.papermc.paper.adventure.PaperAdventure;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
MessageHelper.info(sender, "<i>Checking version, please wait...</i>");
new Thread(() -> {
ComparableVersion newestVersion = FancyHolograms.getInstance().getVersionFetcher().getNewestVersion();
ComparableVersion currentVersion = new ComparableVersion(FancyNpcs.getInstance().getDescription().getVersion());
ComparableVersion currentVersion = new ComparableVersion(FancyHolograms.getInstance().getDescription().getVersion());
if(newestVersion == null){
MessageHelper.error(sender, "Could not find latest version");
} else if(newestVersion.compareTo(currentVersion) > 0){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class HologramCMD implements CommandExecutor, TabExecutor {
@Override
public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if(args.length == 1){
return Stream.of("help", "version", "list", "teleport", "create", "remove", "edit", "copy").filter(input -> input.toLowerCase().startsWith(args[0].toLowerCase())).toList();
return Stream.of("help", "list", "teleport", "create", "remove", "edit", "copy").filter(input -> input.toLowerCase().startsWith(args[0].toLowerCase())).toList();
} else if(args.length == 3 && args[0].equalsIgnoreCase("edit")){
boolean usingNpcs = FancyHolograms.getInstance().isUsingFancyNpcs();
return Stream.of("position", "moveTo", "setLine", "addLine", "removeLine", "insertAfter", "insertBefore", "billboard", "scale", "background", "updateTextInterval", "shadowRadius", "shadowStrength", usingNpcs ? "linkWithNpc" : "", usingNpcs ? "unlinkWithNpc" : "").filter(input -> input.toLowerCase().startsWith(args[2].toLowerCase())).toList();
Expand Down

0 comments on commit 4f2b6d0

Please sign in to comment.