mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-21 01:01:35 +08:00
Fix banner patterns not working in kits (#5723)
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This commit is contained in:
parent
a4ac720057
commit
c19b20ea3b
@ -633,7 +633,7 @@ public class MetaItemStack {
|
||||
|
||||
PatternType patternType = null;
|
||||
try {
|
||||
patternType = PatternType.valueOf(split[0]);
|
||||
patternType = PatternType.getByIdentifier(split[0]);
|
||||
} catch (final Exception ignored) {
|
||||
}
|
||||
|
||||
@ -642,7 +642,7 @@ public class MetaItemStack {
|
||||
final Color color = Color.fromRGB(Integer.parseInt(split[1]));
|
||||
meta.setBaseColor(DyeColor.getByColor(color));
|
||||
} else if (patternType != null) {
|
||||
final PatternType type = PatternType.valueOf(split[0]);
|
||||
final PatternType type = PatternType.getByIdentifier(split[0]);
|
||||
final DyeColor color = DyeColor.getByColor(Color.fromRGB(Integer.parseInt(split[1])));
|
||||
final org.bukkit.block.banner.Pattern pattern = new org.bukkit.block.banner.Pattern(color, type);
|
||||
meta.addPattern(pattern);
|
||||
@ -658,7 +658,7 @@ public class MetaItemStack {
|
||||
|
||||
PatternType patternType = null;
|
||||
try {
|
||||
patternType = PatternType.valueOf(split[0]);
|
||||
patternType = PatternType.getByIdentifier(split[0]);
|
||||
} catch (final Exception ignored) {
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ public class MetaItemStack {
|
||||
final Color color = Color.fromRGB(Integer.parseInt(split[1]));
|
||||
banner.setBaseColor(DyeColor.getByColor(color));
|
||||
} else if (patternType != null) {
|
||||
final PatternType type = PatternType.valueOf(split[0]);
|
||||
final PatternType type = PatternType.getByIdentifier(split[0]);
|
||||
final DyeColor color = DyeColor.getByColor(Color.fromRGB(Integer.parseInt(split[1])));
|
||||
final org.bukkit.block.banner.Pattern pattern = new org.bukkit.block.banner.Pattern(color, type);
|
||||
banner.addPattern(pattern);
|
||||
|
Loading…
Reference in New Issue
Block a user