File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
src/main/java/top/mpt/xzystudio/flywars Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ package top .mpt .xzystudio .flywars .commands .impl ;
2+
3+ import org .bukkit .command .CommandSender ;
4+ import org .bukkit .entity .Player ;
5+ import top .mpt .xzystudio .flywars .commands .ICommand ;
6+
7+ /**
8+ * 清空team指令
9+ */
10+ public class killme extends ICommand {
11+ public killme () {
12+ super ("killme" , "" , "自杀" );
13+ }
14+
15+ public boolean onCommand (CommandSender sender , String [] args ) {
16+ Player p = (Player ) sender ;
17+ p .setHealth (0 );
18+ return true ;
19+ }
20+
21+ public String permission (){
22+ return "flywars.fw.killme" ;
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ private void initHandler() {
5858 registerCommand (new ride ());
5959 registerCommand (new clearteam ());
6060 registerCommand (new eject ());
61+ registerCommand (new killme ());
6162 }
6263
6364 /**
You can’t perform that action at this time.
0 commit comments