mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Merge pull request #1029 from dniym/SpawnerFix
Fix broken spawner error
This commit is contained in:
commit
6575e1c538
@ -2689,7 +2689,9 @@ public class SlimefunSetup {
|
||||
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.REPAIRED_SPAWNER, false)) {
|
||||
EntityType type = null;
|
||||
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) {
|
||||
CreatureSpawner spawner = (CreatureSpawner) e.getBlock().getState();
|
||||
|
Loading…
Reference in New Issue
Block a user