checkstyle: require tabs for indenting

This commit is contained in:
Adam
2017-06-09 23:17:51 -04:00
parent bfff2dc07b
commit 922366e131
2 changed files with 29 additions and 20 deletions

View File

@@ -6,6 +6,12 @@
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
<!-- require tabs for indenting - https://stackoverflow.com/a/28550141 -->
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
</module>
</module>
<module name="SuppressionFilter">
<property name="file" value="suppressions.xml"/>

View File

@@ -22,31 +22,34 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.api;
public enum GameState
{
UNKNOWN(-1),
STARTING(0),
LOGIN_SCREEN(10),
LOGGING_IN(20),
LOADING(25),
LOGGED_IN(30),
HOPPING(45);
UNKNOWN(-1),
STARTING(0),
LOGIN_SCREEN(10),
LOGGING_IN(20),
LOADING(25),
LOGGED_IN(30),
HOPPING(45);
private final int state;
private final int state;
GameState(int state)
{
this.state = state;
}
GameState(int state)
{
this.state = state;
}
public static GameState of(int state)
{
for (GameState gs : GameState.values())
if (gs.state == state)
return gs;
return UNKNOWN;
}
public static GameState of(int state)
{
for (GameState gs : GameState.values())
{
if (gs.state == state)
{
return gs;
}
}
return UNKNOWN;
}
}