forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
package engine.devcmd.cmds;
|
||||
|
||||
import engine.Enum;
|
||||
@@ -22,40 +21,40 @@ import java.time.LocalDateTime;
|
||||
|
||||
public class SetMaintCmd extends AbstractDevCmd {
|
||||
|
||||
public SetMaintCmd() {
|
||||
public SetMaintCmd() {
|
||||
super("setMaint");
|
||||
this.addCmdString("setmaint");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter player, String[] words,
|
||||
AbstractGameObject target) {
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter player, String[] words,
|
||||
AbstractGameObject target) {
|
||||
|
||||
if (!target.getObjectType().equals(Enum.GameObjectType.Building)) {
|
||||
ChatManager.chatSayInfo(player, "Target is not a valid building");
|
||||
return;
|
||||
}
|
||||
if (!target.getObjectType().equals(Enum.GameObjectType.Building)) {
|
||||
ChatManager.chatSayInfo(player, "Target is not a valid building");
|
||||
return;
|
||||
}
|
||||
|
||||
Building targetBuilding = (Building)target;
|
||||
Building targetBuilding = (Building) target;
|
||||
|
||||
if (targetBuilding.getProtectionState().equals(Enum.ProtectionState.NPC)) {
|
||||
ChatManager.chatSayInfo(player, "Target is not a valid building");
|
||||
return;
|
||||
}
|
||||
if (targetBuilding.getProtectionState().equals(Enum.ProtectionState.NPC)) {
|
||||
ChatManager.chatSayInfo(player, "Target is not a valid building");
|
||||
return;
|
||||
}
|
||||
|
||||
MaintenanceManager.setMaintDateTime(targetBuilding, LocalDateTime.now().minusDays(1).withHour(13).withMinute(0).withSecond(0).withNano(0));
|
||||
ChatManager.chatSayInfo(player, "Maint will run for UUID: " + targetBuilding.getObjectUUID());
|
||||
}
|
||||
MaintenanceManager.setMaintDateTime(targetBuilding, LocalDateTime.now().minusDays(1).withHour(13).withMinute(0).withSecond(0).withNano(0));
|
||||
ChatManager.chatSayInfo(player, "Maint will run for UUID: " + targetBuilding.getObjectUUID());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Sets the Rank of either the targets object or the object specified by ID.";
|
||||
}
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Sets the Rank of either the targets object or the object specified by ID.";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /setrank ID rank' || ' /setrank rank' || ' /rank ID rank' || ' /rank rank'";
|
||||
}
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /setrank ID rank' || ' /setrank rank' || ' /rank ID rank' || ' /rank rank'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user