Fix issue when Challenge and ChallengeLevel icons were stored with glowing effect and lore from admin panel.

This issue happened because PanelItem overwrites ItemStack metaData.
It is fixed by returning clone of icon element instead of returning actual icon.
This commit is contained in:
BONNe 2019-01-23 19:49:13 +02:00
parent 9c4c5b7d86
commit 38fce9a4b0
2 changed files with 2 additions and 2 deletions

View File

@ -308,7 +308,7 @@ public class Challenge implements DataObject
*/ */
public ItemStack getIcon() public ItemStack getIcon()
{ {
return icon; return icon.clone();
} }

View File

@ -138,7 +138,7 @@ public class ChallengeLevel implements DataObject, Comparable<ChallengeLevel>
*/ */
public ItemStack getIcon() public ItemStack getIcon()
{ {
return icon; return icon.clone();
} }