SteamWar/BauSystem2.0
Archiviert
12
0

Added new Buttons to Loader #171

Zusammengeführt
YoyoNow hat 2 Commits von Button-Fix nach master 2023-04-18 13:06:33 +02:00 zusammengeführt
Nur Änderungen aus Commit 377bcb92fb werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -24,6 +24,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.bukkit.block.Block;
Review

Die Zeile ist zwar nicht nötig aber ist trotzdem ok

Die Zeile ist zwar nicht nötig aber ist trotzdem ok
@AllArgsConstructor
@RequiredArgsConstructor
@Getter
@ -46,42 +47,25 @@ public enum LoaderButton {
switch (block.getType()) {
case LEVER:
return LoaderButton.SWITCH;
case CRIMSON_BUTTON:
case MANGROVE_BUTTON:
case WARPED_BUTTON:
case ACACIA_BUTTON:
case BIRCH_BUTTON:
case DARK_OAK_BUTTON:
case JUNGLE_BUTTON:
case OAK_BUTTON:
case SPRUCE_BUTTON:
return LoaderButton.WOOD_BUTTON;
case POLISHED_BLACKSTONE_BUTTON:
case STONE_BUTTON:
return LoaderButton.STONE_BUTTON;
case CRIMSON_PRESSURE_PLATE:
case MANGROVE_PRESSURE_PLATE:
case WARPED_PRESSURE_PLATE:
// case POLISHED_BLACKSTONE_PRESSURE_PLATE:
case ACACIA_PRESSURE_PLATE:
case BIRCH_PRESSURE_PLATE:
case DARK_OAK_PRESSURE_PLATE:
case JUNGLE_PRESSURE_PLATE:
case OAK_PRESSURE_PLATE:
case SPRUCE_PRESSURE_PLATE:
case STONE_PRESSURE_PLATE:
return LoaderButton.PRESSURE_PLATE;
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
return LoaderButton.WEIGHTED_PRESSURE_PLATE;
case TRIPWIRE:
return LoaderButton.TRIPWIRE;
case NOTE_BLOCK:
return LoaderButton.NOTEBLOCK;
case DAYLIGHT_DETECTOR:
return LoaderButton.DAYLIGHTSENSOR;
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
return LoaderButton.WEIGHTED_PRESSURE_PLATE;
default:
return LoaderButton.INVALID;
if (block.getType().name().contains("STONE_BUTTON")) {
return LoaderButton.STONE_BUTTON;
} else if (block.getType().name().contains("BUTTON")) {
return LoaderButton.WOOD_BUTTON;
} else if (block.getType().name().contains("PRESSURE_PLATE")) {
return LoaderButton.PRESSURE_PLATE;
} else {
return LoaderButton.INVALID;
}
}
}
}