Skip to content

Commit c045539

Browse files
committed
[U] Call controller in Spigot entry point
1 parent a86709a commit c045539

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/org/hydev/mcpm/SpigotEntry.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.bukkit.plugin.java.JavaPlugin;
77
import org.jetbrains.annotations.NotNull;
88

9+
import java.util.Arrays;
910
import java.util.Objects;
1011
import java.util.logging.Logger;
1112

@@ -17,6 +18,7 @@
1718
public class SpigotEntry extends JavaPlugin implements CommandExecutor
1819
{
1920
private Logger log;
21+
private Controller controller;
2022

2123
/**
2224
* onEnable() is called when our plugin is loaded on a Spigot server.
@@ -28,6 +30,9 @@ public void onEnable()
2830
log = getLogger();
2931
log.info("Enabled!");
3032

33+
// Initialize controller
34+
controller = new Controller();
35+
3136
// Register mcpm command
3237
requireNonNull(this.getCommand("mcpm")).setExecutor(this);
3338
}
@@ -44,7 +49,7 @@ public void onDisable()
4449
@Override
4550
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args)
4651
{
47-
sender.sendMessage("This command is not yet implemented, meow~");
48-
return false;
52+
controller.runCommand(args, sender::sendMessage);
53+
return true;
4954
}
5055
}

0 commit comments

Comments
 (0)