mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
Disallow MA commands while conversing (guard for Setup Mode).
This commit is contained in:
parent
fb4bf3ad27
commit
9e3848ce41
@ -12,6 +12,8 @@ import com.garbagemule.MobArena.commands.user.*;
|
||||
import com.garbagemule.MobArena.commands.admin.*;
|
||||
import com.garbagemule.MobArena.commands.setup.*;
|
||||
import com.garbagemule.MobArena.framework.ArenaMaster;
|
||||
import org.bukkit.conversations.Conversable;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandHandler implements CommandExecutor
|
||||
{
|
||||
@ -32,6 +34,11 @@ public class CommandHandler implements CommandExecutor
|
||||
// Grab the base and arguments.
|
||||
String base = (args.length > 0 ? args[0] : "");
|
||||
String last = (args.length > 0 ? args[args.length - 1] : "");
|
||||
|
||||
// If the player is in a convo (Setup Mode), bail
|
||||
if (sender instanceof Conversable && ((Conversable) sender).isConversing()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If there's no base argument, show a helpful message.
|
||||
if (base.equals("")) {
|
||||
|
Loading…
Reference in New Issue
Block a user