From 07a334d1b9dc8c19859bc25823915ec27013d58a Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 16 Oct 2020 13:28:47 -0500 Subject: [PATCH] Fixed an issue with switching between repair types. --- .../java/com/songoda/ultimaterepairing/repair/RepairType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/ultimaterepairing/repair/RepairType.java b/src/main/java/com/songoda/ultimaterepairing/repair/RepairType.java index 4d00f9b..ad2b2e4 100644 --- a/src/main/java/com/songoda/ultimaterepairing/repair/RepairType.java +++ b/src/main/java/com/songoda/ultimaterepairing/repair/RepairType.java @@ -41,9 +41,9 @@ public enum RepairType { } public RepairType getNext(Player player) { - for (int i = 0; i < values().length; i++) { + for (int i = 1; i < values().length + 1; i++) { int index = ordinal(); - int nextIndex = index + 1; + int nextIndex = index + i; RepairType[] cars = RepairType.values(); nextIndex %= cars.length; RepairType type = cars[nextIndex];