mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-07 09:53:04 +00:00
Implement Command System with Super's help
p.s. very messy Also Implement Listener System re-organize
This commit is contained in:
31
src/main/java/me/totalfreedom/plex/command/impl/PlexCMD.java
Normal file
31
src/main/java/me/totalfreedom/plex/command/impl/PlexCMD.java
Normal file
@ -0,0 +1,31 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
|
||||
import me.totalfreedom.plex.command.annotations.CommandParameters;
|
||||
import me.totalfreedom.plex.command.annotations.CommandPermissions;
|
||||
import me.totalfreedom.plex.command.PlexCommand;
|
||||
import me.totalfreedom.plex.command.source.RequiredCommandSource;
|
||||
import me.totalfreedom.plex.rank.enums.Rank;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = RequiredCommandSource.ANY)
|
||||
@CommandParameters(usage = "/<command>", aliases = "plexhelp", description = "Help with plex")
|
||||
public class PlexCMD extends PlexCommand
|
||||
{
|
||||
public PlexCMD() {
|
||||
super("plex");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args)
|
||||
{
|
||||
sender.sendMessage("HI");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, String[] args) {
|
||||
return Arrays.asList("Telesphoreo", "super", "Taahh");
|
||||
}
|
||||
}
|
36
src/main/java/me/totalfreedom/plex/command/impl/TestCMD.java
Normal file
36
src/main/java/me/totalfreedom/plex/command/impl/TestCMD.java
Normal file
@ -0,0 +1,36 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import me.totalfreedom.plex.command.annotations.CommandParameters;
|
||||
import me.totalfreedom.plex.command.annotations.CommandPermissions;
|
||||
import me.totalfreedom.plex.command.PlexCommand;
|
||||
import me.totalfreedom.plex.command.source.RequiredCommandSource;
|
||||
import me.totalfreedom.plex.rank.enums.Rank;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = RequiredCommandSource.ANY)
|
||||
@CommandParameters(usage = "/<command>", aliases = "tst,tast", description = "HELLO")
|
||||
public class TestCMD extends PlexCommand
|
||||
{
|
||||
public TestCMD() {
|
||||
super("test");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
sender.sendMessage("HIIII BICH");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, String[] args) {
|
||||
if (args.length == 1)
|
||||
{
|
||||
return Arrays.asList("WHATTHEFAWK", "LUL");
|
||||
}
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user