diff --git a/README.md b/README.md index 51292fa..9117e55 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # zDiscord -An easily configurable /discord command for your Minecraft server. +A simple /discord command for your Minecraft server -You need JDK 21 or newer to use zDiscord. +You need JDK 21 or newer to use zDiscord. \ No newline at end of file diff --git a/pom.xml b/pom.xml index 32817f3..dbd6137 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ - 21 + 17 3.13.0 UTF-8 3.6.0 @@ -34,7 +34,7 @@ org.spigotmc spigot-api - 1.21.1-R0.1-SNAPSHOT + 1.17.1-R0.1-SNAPSHOT provided diff --git a/src/main/java/dev/zaviar/zdiscord/zDiscord.java b/src/main/java/dev/zaviar/zdiscord/zDiscord.java index 1f7041c..bc2e11b 100644 --- a/src/main/java/dev/zaviar/zdiscord/zDiscord.java +++ b/src/main/java/dev/zaviar/zdiscord/zDiscord.java @@ -18,7 +18,6 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.plugin.java.JavaPlugin; -import javax.annotation.Nonnull; import java.io.File; import java.util.LinkedHashSet; import java.util.Objects; @@ -54,7 +53,7 @@ public void onEnable() { saveDefaultConfig(); initialise(); - + Objects.requireNonNull(getCommand("discord")).setExecutor(this); Bukkit.getPluginManager().registerEvents(this, this); @@ -62,7 +61,7 @@ public void onEnable() { } @Override - public boolean onCommand(@Nonnull CommandSender sender, @Nonnull Command cmd, @Nonnull String label, @Nonnull String[] args) { + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (sender.isOp() && args.length > 0 && args[0].equalsIgnoreCase("reload")) { sender.sendMessage(ChatColor.GRAY + "Reloading zDiscord..."); initialise(); @@ -112,7 +111,7 @@ private void play(CommandSender commandSender) { } // Play the sound if they are a player - if (commandSender instanceof Player player && soundEnabled) { + if (soundEnabled && commandSender instanceof Player player) { try { Sound sound = Sound.valueOf(this.sound); player.playSound(player.getLocation(), sound, 0.5f, 1f); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 711be06..b460605 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: zDiscord -description: An easily configurable /discord command for your Minecraft server +description: A simple /discord command for your Minecraft server version: 1.5.0-SNAPSHOT -api-version: '1.21.1' +api-version: '1.17' main: dev.zaviar.zdiscord.zDiscord authors: [ zaviar.dev ] folia-supported: true @@ -9,4 +9,4 @@ load: POSTWORLD commands: discord: description: Get the discord link to our server - aliases: [zdiscord] \ No newline at end of file + aliases: [ zdiscord ] \ No newline at end of file