Add shop command

This commit is contained in:
RedSparr0w 2019-09-21 12:02:47 +12:00
parent ccd7cc582f
commit dbe36b04e4

View file

@ -21,6 +21,8 @@ import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin; import org.crandor.plugin.Plugin;
import org.crandor.tools.StringUtils; import org.crandor.tools.StringUtils;
import plugin.zone.GrandExchangeZone.CreditStore;
/** /**
* Handles a player command. * Handles a player command.
* @author Vexia * @author Vexia
@ -28,6 +30,11 @@ import org.crandor.tools.StringUtils;
@InitializablePlugin @InitializablePlugin
public final class PlayerCommandPlugin extends CommandPlugin { public final class PlayerCommandPlugin extends CommandPlugin {
/**
* The store that sells items in exchange for credits.
*/
private static final CreditStore CREDIT_STORE = new CreditStore();
@Override @Override
public Plugin<Object> newInstance(Object arg) throws Throwable { public Plugin<Object> newInstance(Object arg) throws Throwable {
link(CommandSet.PLAYER); link(CommandSet.PLAYER);
@ -48,7 +55,10 @@ public final class PlayerCommandPlugin extends CommandPlugin {
TutorialStage.load(player, stage, false); TutorialStage.load(player, stage, false);
break; break;
*/ */
case "shop":
CREDIT_STORE.open(player);
break;
case "bankresettabs": case "bankresettabs":
for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) { for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) {
player.getBank().getTabStartSlot()[i] = 0; player.getBank().getTabStartSlot()[i] = 0;