Skip to content

Commit

Permalink
Updated: Paper API 1.20.6-R0.1-SNAPSHOT -> 1.21-R0.1-SNAPSHOT
Browse files Browse the repository at this point in the history
Improved: Command Registering
  • Loading branch information
Bram1903 committed Jun 19, 2024
1 parent 974f134 commit 79fcea7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tasks {
// 1.17 = Java 16
// 1.18 - 1.20.4 = Java 17
// 1-20.5+ = Java 21
val version = "1.20.6"
val version = "1.21"
val javaVersion = JavaLanguageVersion.of(21)

val jvmArgsExternal = listOf(
Expand Down
2 changes: 1 addition & 1 deletion libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
adventure = "4.16.0"
packetevents = "2.3.1-SNAPSHOT"
paper = "1.20.6-R0.1-SNAPSHOT"
paper = "1.21-R0.1-SNAPSHOT"
velocity = "3.3.0-SNAPSHOT"
bungeecord = "1.20-R0.1-SNAPSHOT"
snakeyaml = "2.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ protected void enableBStats() {
}

protected void registerCommands() {
this.plugin.getCommand("antihealthindicator").setExecutor(new BukkitAHICommand());
new BukkitAHICommand(this.plugin);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand All @@ -39,6 +40,10 @@

public class BukkitAHICommand implements CommandExecutor, TabExecutor {

public BukkitAHICommand(JavaPlugin plugin) {
plugin.getCommand("antihealthindicator").setExecutor(this);
}

@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (args.length == 0) {
Expand Down

0 comments on commit 79fcea7

Please sign in to comment.