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

Datei anzeigen

@ -24,6 +24,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.bukkit.block.Block; 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 @AllArgsConstructor
@RequiredArgsConstructor @RequiredArgsConstructor
@Getter @Getter
@ -46,34 +47,25 @@ public enum LoaderButton {
switch (block.getType()) { switch (block.getType()) {
case LEVER: case LEVER:
return LoaderButton.SWITCH; return LoaderButton.SWITCH;
case ACACIA_BUTTON:
case BIRCH_BUTTON:
case DARK_OAK_BUTTON:
case JUNGLE_BUTTON:
case OAK_BUTTON:
case SPRUCE_BUTTON:
return LoaderButton.WOOD_BUTTON;
case STONE_BUTTON:
return LoaderButton.STONE_BUTTON;
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: case TRIPWIRE:
return LoaderButton.TRIPWIRE; return LoaderButton.TRIPWIRE;
case NOTE_BLOCK: case NOTE_BLOCK:
return LoaderButton.NOTEBLOCK; return LoaderButton.NOTEBLOCK;
case DAYLIGHT_DETECTOR: case DAYLIGHT_DETECTOR:
return LoaderButton.DAYLIGHTSENSOR; return LoaderButton.DAYLIGHTSENSOR;
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
return LoaderButton.WEIGHTED_PRESSURE_PLATE;
default: default:
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; return LoaderButton.INVALID;
} }
} }
}
} }