SteamWar/BauSystem2.0
Archiviert
12
0

Merge pull request 'Added new Buttons to Loader' (#171) from Button-Fix into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #171
Reviewed-by: Lixfel <lixfel@steamwar.de>
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
YoyoNow 2023-04-18 13:06:33 +02:00
Commit da0a53d636

Datei anzeigen

@ -24,6 +24,7 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.bukkit.block.Block;
@AllArgsConstructor
@RequiredArgsConstructor
@Getter
@ -46,34 +47,25 @@ public enum LoaderButton {
switch (block.getType()) {
case LEVER:
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:
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;
}
}
}
}