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.
@ -5,4 +5,4 @@ authors: ["Newt_00"]
|
|||||||
description: "utility plugin for Cosway servers, a yescraft network server"
|
description: "utility plugin for Cosway servers, a yescraft network server"
|
||||||
api-version: '1.21'
|
api-version: '1.21'
|
||||||
author: "Newt_00"
|
author: "Newt_00"
|
||||||
website: "ycs.Newt-Tech.com"
|
website: "ycs.Newt-Tech.com"
|
||||||
|
Binary file not shown.
@ -1,10 +1,13 @@
|
|||||||
package CoswayUtil;
|
package CoswayUtil;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.RayTraceResult;
|
import org.bukkit.util.RayTraceResult;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public final class CoswayUtil extends JavaPlugin {
|
public final class CoswayUtil extends JavaPlugin {
|
||||||
|
|
||||||
@ -18,6 +21,17 @@ public final class CoswayUtil extends JavaPlugin {
|
|||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
serverMessage("im dead, im alive but im dead....");
|
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() {
|
public String prefix() {
|
||||||
return "[Cosway Utility] ";
|
return "[Cosway Utility] ";
|
||||||
|
@ -6,3 +6,7 @@ description: "utility plugin for Cosway servers, a yescraft network server"
|
|||||||
api-version: '1.21'
|
api-version: '1.21'
|
||||||
author: "Newt_00"
|
author: "Newt_00"
|
||||||
website: "ycs.Newt-Tech.com"
|
website: "ycs.Newt-Tech.com"
|
||||||
|
commands:
|
||||||
|
scale:
|
||||||
|
permission: cosway.admin
|
||||||
|
usage: /scale <float>
|
Loading…
Reference in New Issue
Block a user