diff options
author | Leonard Kugis <leonard@kug.is> | 2022-04-25 18:40:22 +0200 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2022-04-25 18:40:22 +0200 |
commit | 9420b8c5ef71dee01d7e19160992c34d5feef154 (patch) | |
tree | 5c31e9c3ff1e0bebeff4b164d739c46abbee7c7b /src/main/java/com/encrox/instanceddungeons/Commander.java | |
parent | eaed2149f9f018a4486828fea612c7322af32171 (diff) |
Diffstat (limited to 'src/main/java/com/encrox/instanceddungeons/Commander.java')
-rw-r--r-- | src/main/java/com/encrox/instanceddungeons/Commander.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/com/encrox/instanceddungeons/Commander.java b/src/main/java/com/encrox/instanceddungeons/Commander.java new file mode 100644 index 0000000..a9b5f39 --- /dev/null +++ b/src/main/java/com/encrox/instanceddungeons/Commander.java @@ -0,0 +1,40 @@ +package com.encrox.instanceddungeons;
+
+import org.bukkit.ChatColor;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.json.JSONObject;
+
+public class Commander implements CommandExecutor {
+
+ @Override
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
+ if(sender instanceof Player) {
+ Player player = (Player)sender;
+ try {
+ switch(args[0]) {
+ case "open":
+ break;
+ case "invite":
+ break;
+ case "join":
+ break;
+ case "close":
+ break;
+ case "random":
+ Dungeon dungeon = new Dungeon(player, args[1], Integer.parseInt(args[2]));
+ InstancedDungeons.dungeons.add(dungeon);
+ return true;
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ } else {
+ sender.sendMessage("no player");
+ }
+ return false;
+ }
+
+}
|