1.2.0: Remove unnecessary events, use yml as a config

This commit is contained in:
2025-10-15 21:12:07 +08:00
parent 6b463cf5b3
commit eabb5a69c1
30 changed files with 326 additions and 659 deletions
@@ -0,0 +1,27 @@
package moe.sob.commands;
import moe.sob.Main;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
public class SetGreetMessageCommand implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (args[0].isBlank()) {
sender.sendMessage("Insufficient arguments.");
return false;
} else {
try {
String greetMessage = String.join(" ", args);
Main.configR.set("server.greet_message", greetMessage);
Main.configR.save(Main.config);
sender.sendMessage("Changed greet message successfully.");
return true;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}