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() {
58
58
registerCommand (new ride ());
59
59
registerCommand (new clearteam ());
60
60
registerCommand (new eject ());
61
+ registerCommand (new killme ());
61
62
}
62
63
63
64
/**
You can’t perform that action at this time.
0 commit comments