Clean up the jailstop command, make it tell what all they stopped.
This commit is contained in:
parent
b75f12c23c
commit
3ab161cbe8
@ -1,5 +1,6 @@
|
|||||||
package com.graywolf336.jail.command.commands;
|
package com.graywolf336.jail.command.commands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import com.graywolf336.jail.JailManager;
|
import com.graywolf336.jail.JailManager;
|
||||||
@ -15,13 +16,17 @@ import com.graywolf336.jail.command.CommandInfo;
|
|||||||
usage = "/jailstop"
|
usage = "/jailstop"
|
||||||
)
|
)
|
||||||
public class JailStopCommand implements Command {
|
public class JailStopCommand implements Command {
|
||||||
|
|
||||||
public boolean execute(JailManager jm, CommandSender sender, String... args) {
|
public boolean execute(JailManager jm, CommandSender sender, String... args) {
|
||||||
jm.removeJailCreationPlayer(sender.getName());
|
if(jm.isCreatingACell(sender.getName())) {
|
||||||
jm.removeCellCreationPlayer(sender.getName());
|
jm.removeCellCreationPlayer(sender.getName());
|
||||||
|
sender.sendMessage(ChatColor.RED + "You have stopped creating cells.");
|
||||||
sender.sendMessage("Any creations, jail or cell, have been stopped.");
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(jm.isCreatingAJail(sender.getName())) {
|
||||||
|
jm.removeJailCreationPlayer(sender.getName());
|
||||||
|
sender.sendMessage(ChatColor.RED + "You have stopped creating a jail.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user