Skip to content

Commit

Permalink
试图修bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Gingmzmzx committed Jan 13, 2023
1 parent 8951cda commit b3a3509
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/java/top/mpt/xzystudio/flywars/commands/impl/killme.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package top.mpt.xzystudio.flywars.commands.impl;

import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import top.mpt.xzystudio.flywars.commands.ICommand;

/**
* 清空team指令
*/
public class killme extends ICommand {
public killme() {
super("killme", "", "自杀");
}

public boolean onCommand(CommandSender sender, String[] args) {
Player p = (Player) sender;
p.setHealth(0);
return true;
}

public String permission(){
return "flywars.fw.killme";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private void initHandler() {
registerCommand(new ride());
registerCommand(new clearteam());
registerCommand(new eject());
registerCommand(new killme());
}

/**
Expand Down

0 comments on commit b3a3509

Please sign in to comment.