Updated to use new Panel API

This commit is contained in:
Tastybento 2018-05-01 23:19:44 -07:00
parent c1517d38b9
commit f70195f3a0

View File

@ -92,7 +92,7 @@ public class ChallengesPanels {
.name(challenge.getFriendlyName().isEmpty() ? challenge.getUniqueId() : challenge.getFriendlyName())
.description(challengeDescription(challenge, user))
.glow(completed)
.clickHandler((player,c) -> {
.clickHandler((panel, player, c, s) -> {
if (!challenge.getChallengeType().equals(ChallengeType.ICON)) {
new TryToComplete(addon, player, manager, challenge);
}
@ -130,7 +130,7 @@ public class ChallengesPanels {
.icon(new ItemStack(Material.BOOK_AND_QUILL))
.name(name)
.description(manager.stringSplit(user.getTranslation("challenges.navigation","[level]",name)))
.clickHandler((u, c) -> {
.clickHandler((p, u, c, s) -> {
u.closeInventory();
u.performCommand(ChallengesCommand.CHALLENGE_COMMAND + " " + status.getLevel().getUniqueId());
return true;