Skip to content

Commit b3a3509

Browse files
committed
试图修bug
1 parent 8951cda commit b3a3509

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}

src/main/java/top/mpt/xzystudio/flywars/executor/CommandHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)