From 931aa484d6b3400ec12ead808468dc98cba80379 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 10 Feb 2017 20:25:47 +1300 Subject: [PATCH] Why isn't this compiling? --- .../disguise/disguisetypes/RabbitType.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/RabbitType.java b/src/me/libraryaddict/disguise/disguisetypes/RabbitType.java index 728f2697..7668820c 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/RabbitType.java +++ b/src/me/libraryaddict/disguise/disguisetypes/RabbitType.java @@ -1,15 +1,11 @@ package me.libraryaddict.disguise.disguisetypes; -public enum RabbitType -{ +public enum RabbitType { BLACK(2), BROWN(0), GOLD(4), KILLER_BUNNY(99), PATCHES(3), PEPPER(5), WHITE(1); - public static RabbitType getType(int id) - { - for (RabbitType type : values()) - { - if (type.getTypeId() == id) - { + public static RabbitType getType(int id) { + for (RabbitType type : values()) { + if (type.getTypeId() == id) { return type; } } @@ -19,13 +15,11 @@ public enum RabbitType private int type; - private RabbitType(int type) - { + private RabbitType(int type) { this.type = type; } - public int getTypeId() - { + public int getTypeId() { return type; } }