Skip to content

Commit

Permalink
Slight cleanup to naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaviar committed Oct 4, 2024
1 parent 2b7cfaa commit cfb5fd3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</licenses>

<properties>
<java.version>21</java.version>
<java.version>17</java.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-compiler-plugin.sourceEncoding>UTF-8</maven-compiler-plugin.sourceEncoding>
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
Expand All @@ -34,7 +34,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/dev/zaviar/zdiscord/zDiscord.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,15 +53,15 @@ public void onEnable() {
saveDefaultConfig();

initialise();

Objects.requireNonNull(getCommand("discord")).setExecutor(this);
Bukkit.getPluginManager().registerEvents(this, this);

getLogger().info("The plugin has started!");
}

@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();
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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
load: POSTWORLD
commands:
discord:
description: Get the discord link to our server
aliases: [zdiscord]
aliases: [ zdiscord ]

0 comments on commit cfb5fd3

Please sign in to comment.