mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Fix broken spawner error
This commit is contained in:
parent
deb904f338
commit
da8def9d4f
@ -2689,7 +2689,9 @@ public class SlimefunSetup {
|
|||||||
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.REPAIRED_SPAWNER, false)) {
|
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.REPAIRED_SPAWNER, false)) {
|
||||||
EntityType type = null;
|
EntityType type = null;
|
||||||
for (String line: item.getItemMeta().getLore()) {
|
for (String line: item.getItemMeta().getLore()) {
|
||||||
if (ChatColor.stripColor(line).startsWith("Type: ")) type = EntityType.valueOf(ChatColor.stripColor(line).replace("Type: ", "").replace(" ", "_").toUpperCase());
|
if (ChatColor.stripColor(line).startsWith("Type: ") && !line.contains("<Type>"))
|
||||||
|
type = EntityType.valueOf(ChatColor.stripColor(line).replace("Type: ", "").replace(" ", "_").toUpperCase());
|
||||||
|
|
||||||
}
|
}
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
CreatureSpawner spawner = (CreatureSpawner) e.getBlock().getState();
|
CreatureSpawner spawner = (CreatureSpawner) e.getBlock().getState();
|
||||||
|
Loading…
Reference in New Issue
Block a user