mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Full support for lives and keeping inventory in dungeons (0.9)
This commit is contained in:
parent
57a177a8cf
commit
2a6b52c962
29
src/com/dre/dungeonsxl/commands/CMDLives.java
Normal file
29
src/com/dre/dungeonsxl/commands/CMDLives.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.dre.dungeonsxl.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.dre.dungeonsxl.P;
|
||||||
|
|
||||||
|
public class CMDLives extends DCommand {
|
||||||
|
|
||||||
|
public CMDLives() {
|
||||||
|
this.command = "lives";
|
||||||
|
this.args = 1;
|
||||||
|
this.help = p.language.get("Help_Cmd_Lives");
|
||||||
|
this.isPlayerCommand = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onExecute(String[] args, CommandSender sender) {
|
||||||
|
Player player = (Player) sender;
|
||||||
|
String lives = "";
|
||||||
|
if (P.lives.containsKey(player)) {
|
||||||
|
lives = String.valueOf(P.lives.get(player));
|
||||||
|
p.msg(player, p.language.get("Cmd_Lives").replaceAll("v1", player.getName()).replaceAll("v2", lives));
|
||||||
|
} else {
|
||||||
|
p.msg(player, p.language.get("Error_NotInDungeon"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user