Skip to content

Commit b830669

Browse files
committed
Add 1.21.10 support
1 parent 188d371 commit b830669

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ allprojects {
1414
maven("https://jitpack.io/")
1515
maven("https://repo.artillex-studios.com/releases/")
1616
maven("https://repo.codemc.org/repository/maven-public/")
17+
maven("https://repo.papermc.io/repository/maven-public/")
1718
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
1819
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
1920
}
@@ -34,8 +35,8 @@ subprojects {
3435
dependencies {
3536
implementation("com.artillexstudios.axapi:axapi:1.4.802:all")
3637
compileOnly("com.github.ben-manes.caffeine:caffeine:3.2.2")
37-
compileOnly("org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT")
38-
compileOnly("dev.jorel:commandapi-spigot-shade:11.0.0")
38+
compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
39+
compileOnly("dev.jorel:commandapi-paper-shade:11.0.0")
3940
compileOnly("net.kyori:adventure-platform-bukkit:4.4.1")
4041
compileOnly("org.apache.commons:commons-lang3:3.19.0")
4142
compileOnly("commons-io:commons-io:2.20.0")

common/src/main/java/com/artillexstudios/axvanish/AxVanishPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void dependencies(DependencyManagerWrapper manager) {
2828
manager.repository(Repository.jitpack());
2929
manager.repository("https://repo.codemc.org/repository/maven-public/");
3030
manager.repository("https://hub.spigotmc.org/nexus/content/repositories/snapshots/");
31-
manager.dependency("dev{}jorel:commandapi-spigot-shade:11.0.0", true);
31+
manager.dependency("dev{}jorel:commandapi-paper-shade:11.0.0");
3232
manager.dependency("com{}h2database:h2:2.4.240");
3333
manager.dependency("com{}zaxxer:HikariCP:7.0.2");
3434
manager.dependency("org{}jooq:jooq:3.20.8");

common/src/main/java/com/artillexstudios/axvanish/command/AxVanishCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
import com.artillexstudios.axvanish.config.Config;
1515
import com.artillexstudios.axvanish.config.Groups;
1616
import com.artillexstudios.axvanish.config.Language;
17+
import com.destroystokyo.paper.profile.PlayerProfile;
1718
import dev.jorel.commandapi.CommandAPI;
18-
import dev.jorel.commandapi.CommandAPISpigotConfig;
19+
import dev.jorel.commandapi.CommandAPIPaperConfig;
1920
import dev.jorel.commandapi.CommandTree;
2021
import dev.jorel.commandapi.arguments.LiteralArgument;
2122
import dev.jorel.commandapi.arguments.PlayerProfileArgument;
@@ -35,8 +36,7 @@ public AxVanishCommand(AxVanishPlugin plugin) {
3536
}
3637

3738
public void load() {
38-
CommandAPI.onLoad(new CommandAPISpigotConfig(this.plugin)
39-
.skipReloadDatapacks(true)
39+
CommandAPI.onLoad(new CommandAPIPaperConfig(this.plugin)
4040
.setNamespace("axvanish")
4141
);
4242
}
@@ -93,13 +93,13 @@ public void register() {
9393
.then(new PlayerProfileArgument("player")
9494
.withPermission("axvanish.command.toggle.other")
9595
.executes((sender, args) -> {
96-
OfflinePlayer offlinePlayer = args.getByClass("player", OfflinePlayer.class);
96+
PlayerProfile offlinePlayer = args.getByClass("player", PlayerProfile.class);
9797
if (offlinePlayer == null) {
9898
return;
9999
}
100100

101101
VanishSource source = sender instanceof Player player ? AxVanishAPI.instance().getUserIfLoadedImmediately(player) : ConsoleVanishSource.INSTANCE;
102-
AxVanishAPI.instance().user(offlinePlayer.getUniqueId()).thenAccept(user -> {
102+
AxVanishAPI.instance().user(offlinePlayer.getId()).thenAccept(user -> {
103103
if (source instanceof User senderUser) {
104104
if (senderUser.group() != null && user.group() != null && senderUser.group().priority() < user.group().priority()) {
105105
MessageUtils.sendMessage(sender, Language.prefix, Language.error.notHighEnoughGroup);

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#Sun Jan 05 12:59:55 CET 2025
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip

0 commit comments

Comments
 (0)