Makes a whole lot of changes

Adds some new tests
Improves plugin command handling by using one class for each command
Makes some changes to vehicle teleportation to support horses and pigs, but vehicle teleportation is still buggy and messy
Adds some more missing comments
Adds a wildcard permission and uses built-in permissions some places to avoid checking for three different permissions
This commit is contained in:
2021-02-16 21:58:31 +01:00
parent df074b9ff5
commit 5b7f5649b1
18 changed files with 584 additions and 246 deletions

View File

@ -0,0 +1,26 @@
package net.knarcraft.stargate.command;
import net.knarcraft.stargate.Stargate;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
/**
* This command represents the plugin's about command
*/
public class CommandAbout implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
@NotNull String[] strings) {
commandSender.sendMessage(ChatColor.GOLD + "Stargate Plugin created by " + ChatColor.GREEN + "Drakia");
String author = Stargate.languageLoader.getString("author");
if (!author.isEmpty())
commandSender.sendMessage(ChatColor.GOLD + "Language created by " + ChatColor.GREEN + author);
return true;
}
}