Last active
April 17, 2020 08:40
-
-
Save sunghun7511/04dd99fba92c48e25cba324175571c18 to your computer and use it in GitHub Desktop.
AnnouncePlus 커맨드 구조 예시
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package chsui.AnnouncePlus.Commands; | |
import java.util.List; | |
import org.bukkit.command.CommandSender; | |
import chsui.AnnouncePlus.Controller.SubCommand; | |
public class SubAnnounceAdd extends SubCommand { | |
public SubAnnounceAdd() { | |
super("생성"); | |
} | |
@Override | |
public void onCommand(CommandSender sender, List<String> args) { | |
sender.sendMessage("Add"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package chsui.AnnouncePlus.Controller; | |
import java.util.List; | |
import org.bukkit.command.CommandSender; | |
public abstract class SubCommand { | |
private final String command; | |
protected SubCommand(String command) { | |
this.command = command; | |
} | |
public abstract void onCommand(CommandSender sender, List<String> args); | |
public final String getCommand() { | |
return this.command; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment