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.
68 lines
1.9 KiB
68 lines
1.9 KiB
3 years ago
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||
|
// 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;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
2 years ago
|
public class MineActiveCmd extends AbstractDevCmd {
|
||
3 years ago
|
|
||
2 years ago
|
public MineActiveCmd() {
|
||
3 years ago
|
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":
|
||
|
mine.handleStartMineWindow();
|
||
|
Mine.setLastChange(System.currentTimeMillis());
|
||
|
break;
|
||
|
case "false":
|
||
|
mine.handleEndMineWindow();
|
||
|
Mine.setLastChange(System.currentTimeMillis());
|
||
|
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";
|
||
|
}
|
||
|
|
||
|
}
|