Basic command structure for setspawnflyarea command
This commit is contained in:
parent
938a176a9f
commit
808ff6c84e
18
src/main/java/dev/kske/spawnfly/SpawnCommand.java
Normal file
18
src/main/java/dev/kske/spawnfly/SpawnCommand.java
Normal file
@ -0,0 +1,18 @@
|
||||
package dev.kske.spawnfly;
|
||||
|
||||
import org.bukkit.command.*;
|
||||
|
||||
public class SpawnCommand implements CommandExecutor {
|
||||
public SpawnCommand() {}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label,
|
||||
String[] args) {
|
||||
if(command.getName().equals("setspawnflyarea")) {
|
||||
sender.sendMessage("Hello this works!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -9,6 +9,7 @@ public final class SpawnFly extends JavaPlugin {
|
||||
public void onEnable() {
|
||||
getLogger().info("onEnable has been invoked!");
|
||||
Bukkit.getPluginManager().registerEvents(new SpawnListener(), this);
|
||||
getCommand("setspawnflyarea").setExecutor(new SpawnCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,3 +1,6 @@
|
||||
name: spawn-fly
|
||||
name: spawn-fly
|
||||
main: dev.kske.spawnfly.SpawnFly
|
||||
version: 0.0.1
|
||||
commands:
|
||||
setspawnflyarea:
|
||||
usage: /setspawnflyarea
|
||||
|
Loading…
Reference in New Issue
Block a user