mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +01:00
Commands API- Made some test commands
This commit is contained in:
parent
65999aa550
commit
2079c82795
@ -1,5 +1,6 @@
|
||||
package us.tastybento.bskyblock.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.config.Settings;
|
||||
|
||||
@ -13,4 +14,9 @@ public class AdminCommand extends CompositeCommand {
|
||||
public void setup() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender sender, String[] args) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package us.tastybento.bskyblock.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.commands.island.IslandAboutCommand;
|
||||
import us.tastybento.bskyblock.commands.island.IslandTeamCommand;
|
||||
import us.tastybento.bskyblock.config.Settings;
|
||||
|
||||
public class IslandCommand extends CompositeCommand {
|
||||
@ -11,6 +14,13 @@ public class IslandCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
this.addSubCommand(new IslandAboutCommand());
|
||||
this.addSubCommand(new IslandTeamCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender sender, String[] args) {
|
||||
sender.sendMessage("You successfully did /is !");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,24 @@
|
||||
package us.tastybento.bskyblock.commands.island;
|
||||
|
||||
public class IslandAboutCommand {
|
||||
import org.bukkit.command.CommandSender;
|
||||
import us.tastybento.bskyblock.api.commands.CommandArgument;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class IslandAboutCommand extends CommandArgument {
|
||||
|
||||
public IslandAboutCommand() {
|
||||
super("about", "ab");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender sender, String[] args) {
|
||||
sender.sendMessage("You did /is about successfully!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> tabComplete(CommandSender sender, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,25 @@
|
||||
package us.tastybento.bskyblock.commands.island;
|
||||
|
||||
public class IslandTeamCommand {
|
||||
import org.bukkit.command.CommandSender;
|
||||
import us.tastybento.bskyblock.api.commands.CommandArgument;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class IslandTeamCommand extends CommandArgument {
|
||||
|
||||
public IslandTeamCommand() {
|
||||
super("team");
|
||||
this.addSubCommand(new IslandTeamInviteCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender sender, String[] args) {
|
||||
sender.sendMessage("Hey, you've got a pretty team there :D");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> tabComplete(CommandSender sender, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,24 @@
|
||||
package us.tastybento.bskyblock.commands.island;
|
||||
|
||||
public class IslandTeamInviteCommand {
|
||||
import org.bukkit.command.CommandSender;
|
||||
import us.tastybento.bskyblock.api.commands.CommandArgument;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class IslandTeamInviteCommand extends CommandArgument {
|
||||
|
||||
public IslandTeamInviteCommand() {
|
||||
super("invite");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender sender, String[] args) {
|
||||
sender.sendMessage("Wants to invite some people, hu?");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> tabComplete(CommandSender sender, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user