Class CustomLevelConfig


  • @Plugin(name="CustomLevel",
            category="Core",
            printObject=true)
    public final class CustomLevelConfig
    extends java.lang.Object
    Descriptor of a custom Level object that is created via configuration.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int intLevel  
      private java.lang.String levelName  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CustomLevelConfig​(java.lang.String levelName, int intLevel)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static CustomLevelConfig createLevel​(java.lang.String levelName, int intLevel)
      Creates a CustomLevelConfig object.
      boolean equals​(java.lang.Object object)  
      int getIntLevel()
      Returns the custom level intLevel that determines the strength of the custom level relative to the built-in levels.
      java.lang.String getLevelName()
      Returns the custom level name.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • levelName

        private final java.lang.String levelName
      • intLevel

        private final int intLevel
    • Constructor Detail

      • CustomLevelConfig

        private CustomLevelConfig​(java.lang.String levelName,
                                  int intLevel)
    • Method Detail

      • createLevel

        @PluginFactory
        public static CustomLevelConfig createLevel​(@PluginAttribute("name")
                                                    java.lang.String levelName,
                                                    @PluginAttribute("intLevel")
                                                    int intLevel)
        Creates a CustomLevelConfig object. This also defines the Level object with a call to Level.forName(String, int).
        Parameters:
        levelName - name of the custom level.
        intLevel - the intLevel that determines where this level resides relative to the built-in levels
        Returns:
        A CustomLevelConfig object.
      • getLevelName

        public java.lang.String getLevelName()
        Returns the custom level name.
        Returns:
        the custom level name
      • getIntLevel

        public int getIntLevel()
        Returns the custom level intLevel that determines the strength of the custom level relative to the built-in levels.
        Returns:
        the custom level intLevel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object