Package 

Enum BaseCommand.CommandContext

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CAMPAIGN_MAP

      Command was entered on the campaign map.

      CAMPAIGN_MARKET

      Command was entered in a market.

      COMBAT_CAMPAIGN

      Command was entered during a battle in the campaign (doesn't include simulation battles).

      COMBAT_MISSION

      Command was entered during a mission.

      COMBAT_SIMULATION

      Command was entered during a refit simulation battle.

    • Method Summary

      Modifier and Type Method Description
      boolean isInCombat() Returns whether this context is on the combat map.
      boolean isInCampaign() Returns whether this context is on the campaign map.
      boolean isInMarket() Returns whether the player is interacting with a market-containing entity.
      boolean isCampaignAccessible() Returns whether the player is in campaign mode, including in campaign battles (even refit simulationbattles).
      SectorEntityToken getEntityInteractedWith() Returns the SectorEntityToken the player is in a dialog with, if any.
      MarketAPI getMarket() Returns the MarketAPI of the ) the player is in a dialog with, if any.
      static Array<BaseCommand.CommandContext> values()
      static BaseCommand.CommandContext valueOf(String name)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isInCombat

         boolean isInCombat()

        Returns whether this context is on the combat map.

      • isInCampaign

         boolean isInCampaign()

        Returns whether this context is on the campaign map.

      • isInMarket

         boolean isInMarket()

        Returns whether the player is interacting with a market-containing entity.

      • isCampaignAccessible

         boolean isCampaignAccessible()

        Returns whether the player is in campaign mode, including in campaign battles (even refit simulationbattles).

      • getEntityInteractedWith

        @Nullable() SectorEntityToken getEntityInteractedWith()

        Returns the SectorEntityToken the player is in a dialog with, if any.

      • getMarket

        @Nullable() MarketAPI getMarket()

        Returns the MarketAPI of the ) the player is in a dialog with, if any. { } of the { } the player is currently in dialog with, or { null } if they are not in a dialog with a market-containing entity.