Additional voiced commands for auto potions.

This commit is contained in:
MobiusDevelopment
2020-09-30 00:54:56 +00:00
parent 6937446702
commit b73d3fc78b
38 changed files with 361 additions and 190 deletions

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;

View File

@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Auto Potion Settings # Auto Potion Settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Use .apon / .apoff voiced commands to enable / disable. # Use .apon / .apoff or .potionon / .potionoff commands to enable / disable.
# Enable auto potion commands. # Enable auto potion commands.
AutoPotionsEnabled = false AutoPotionsEnabled = false

View File

@@ -29,7 +29,9 @@ public class AutoPotion implements IVoicedCommandHandler
private static final String[] VOICED_COMMANDS = private static final String[] VOICED_COMMANDS =
{ {
"apon", "apon",
"apoff" "apoff",
"potionon",
"potionoff"
}; };
@Override @Override
@@ -45,15 +47,22 @@ public class AutoPotion implements IVoicedCommandHandler
return false; return false;
} }
if (command.equals("apon")) switch (command)
{
case "apon":
case "potionon":
{ {
AutoPotionTaskManager.getInstance().add(activeChar); AutoPotionTaskManager.getInstance().add(activeChar);
activeChar.sendMessage("Auto potions is enabled."); activeChar.sendMessage("Auto potions is enabled.");
break;
} }
else if (command.equals("apoff")) case "apoff":
case "potionoff":
{ {
AutoPotionTaskManager.getInstance().remove(activeChar); AutoPotionTaskManager.getInstance().remove(activeChar);
activeChar.sendMessage("Auto potions is disabled."); activeChar.sendMessage("Auto potions is disabled.");
break;
}
} }
return true; return true;