added scaling command
This commit is contained in:
parent
34edd25f5d
commit
a61363c8e1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +1,13 @@
|
||||
package CoswayUtil;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.RayTraceResult;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class CoswayUtil extends JavaPlugin {
|
||||
|
||||
@ -18,6 +21,17 @@ public final class CoswayUtil extends JavaPlugin {
|
||||
public void onDisable() {
|
||||
serverMessage("im dead, im alive but im dead....");
|
||||
}
|
||||
public boolean onCommand(@NotNull CommandSender sender, Command cmd, @NotNull String label, String[] args) {
|
||||
if (cmd.getName().equalsIgnoreCase("scale") && sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if (args.length < 1) {
|
||||
return false;
|
||||
} else {
|
||||
setScale(player, Float.parseFloat(args[1]));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public String prefix() {
|
||||
return "[Cosway Utility] ";
|
||||
|
@ -6,3 +6,7 @@ description: "utility plugin for Cosway servers, a yescraft network server"
|
||||
api-version: '1.21'
|
||||
author: "Newt_00"
|
||||
website: "ycs.Newt-Tech.com"
|
||||
commands:
|
||||
scale:
|
||||
permission: cosway.admin
|
||||
usage: /scale <float>
|
Loading…
Reference in New Issue
Block a user