fcb1ce4e4b
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: yoyosource <yoyosource@nidido.de>
44 Zeilen
1.7 KiB
Java
44 Zeilen
1.7 KiB
Java
/*
|
|
* This file is a part of the SteamWar software.
|
|
*
|
|
* Copyright (C) 2023 SteamWar.de-Serverteam
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
package de.steamwar.bausystem.utils;
|
|
|
|
import org.bukkit.Material;
|
|
|
|
public class PlaceItemWrapper15 implements PlaceItemWrapper {
|
|
|
|
public PlaceItemWrapper15() {
|
|
for (Material material : Material.values()) {
|
|
if (!material.isBlock()) continue;
|
|
if (material.isLegacy()) continue;
|
|
|
|
String nonWall = material.name().replace("_WALL_", "").replace("WALL_", "").replace("_WALL", "");
|
|
try {
|
|
Material nonWallMaterial = Material.valueOf(nonWall);
|
|
if (nonWallMaterial != material && nonWallMaterial.isItem() && !nonWallMaterial.isBlock()) {
|
|
BLOCK_MATERIAL_TO_WALL_BLOCK_MATERIAL.put(nonWallMaterial, material);
|
|
}
|
|
} catch (Exception e) {
|
|
// Ignore
|
|
}
|
|
}
|
|
ITEM_MATERIAL_TO_BLOCK_MATERIAL.put(Material.REDSTONE, Material.REDSTONE_WIRE);
|
|
}
|
|
}
|