Public Repository for the Magicbane Shadowbane Emulator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.1 KiB

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.devcmd.cmds;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.BuildingManager;
import engine.objects.AbstractGameObject;
import engine.objects.Building;
import engine.objects.Mine;
import engine.objects.PlayerCharacter;
import engine.workthreads.HourlyJobThread;
/**
*
*/
public class MineActiveCmd extends AbstractDevCmd {
public MineActiveCmd() {
super("mineactive");
}
@Override
protected void _doCmd(PlayerCharacter pcSender, String[] args,
AbstractGameObject target) {
Building mineBuilding = BuildingManager.getBuilding(target.getObjectUUID());
if (mineBuilding == null)
return;
Mine mine = Mine.getMineFromTower(mineBuilding.getObjectUUID());
if (mine == null)
return;
String trigger = args[0];
switch (trigger) {
case "true":
HourlyJobThread.mineWindowOpen(mine);
break;
case "false":
HourlyJobThread.mineWindowClose(mine);
break;
default:
this.sendUsage(pcSender);
break;
}
}
@Override
protected String _getUsageString() {
return "' /mineactive true|false";
}
@Override
protected String _getHelpString() {
return "Temporarily add visual effects to Character";
}
}