mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-22 10:35:58 +01:00
Drop Depricated 1.13 SIGN object.
Update to 1.7 BentoBox.
This commit is contained in:
parent
4e6d37cd90
commit
449890def5
2
pom.xml
2
pom.xml
@ -36,7 +36,7 @@
|
||||
<powermock.version>1.7.4</powermock.version>
|
||||
<!-- More visible way how to change dependency versions -->
|
||||
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
|
||||
<bentobox.version>1.7.0-SNAPSHOT</bentobox.version>
|
||||
<bentobox.version>1.7.0</bentobox.version>
|
||||
<level.version>1.6.0</level.version>
|
||||
<vault.version>1.7</vault.version>
|
||||
<!-- Revision variable removes warning about dynamic version -->
|
||||
|
@ -1,7 +1,6 @@
|
||||
package world.bentobox.challenges;
|
||||
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -100,14 +99,6 @@ public class ChallengesAddon extends Addon {
|
||||
new Flag.Builder("CHALLENGES_ISLAND_PROTECTION", Material.COMMAND_BLOCK).defaultRank(RanksManager.VISITOR_RANK).build();
|
||||
|
||||
|
||||
/**
|
||||
* This ir ugly way how to fix comparability issues between 1.13 and 1.14 versions.
|
||||
* @deprecated Should be removed as soon as 1.13 support are dropped down.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final Material SIGN_MATERIAL = Bukkit.getBukkitVersion().startsWith("1.13") ? Material.getMaterial("SIGN") : Material.getMaterial("OAK_SIGN");
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Methods
|
||||
// ---------------------------------------------------------------------
|
||||
|
@ -273,7 +273,7 @@ public abstract class CommonGUI
|
||||
{
|
||||
name = this.user.getTranslation("challenges.gui.buttons.next");
|
||||
description = Collections.emptyList();
|
||||
icon = new ItemStack(ChallengesAddon.SIGN_MATERIAL);
|
||||
icon = new ItemStack(Material.OAK_SIGN);
|
||||
clickHandler = (panel, user, clickType, slot) -> {
|
||||
this.pageIndex++;
|
||||
this.build();
|
||||
@ -286,7 +286,7 @@ public abstract class CommonGUI
|
||||
{
|
||||
name = this.user.getTranslation("challenges.gui.buttons.previous");
|
||||
description = Collections.emptyList();
|
||||
icon = new ItemStack(ChallengesAddon.SIGN_MATERIAL);
|
||||
icon = new ItemStack(Material.OAK_SIGN);
|
||||
clickHandler = (panel, user, clickType, slot) -> {
|
||||
this.pageIndex--;
|
||||
this.build();
|
||||
|
@ -455,7 +455,7 @@ public class EditSettingsGUI extends CommonGUI
|
||||
this.user.getTranslation("challenges.gui.descriptions.enabled") :
|
||||
this.user.getTranslation("challenges.gui.descriptions.disabled")));
|
||||
name = this.user.getTranslation("challenges.gui.buttons.admin.title-enable");
|
||||
icon = new ItemStack(ChallengesAddon.SIGN_MATERIAL);
|
||||
icon = new ItemStack(Material.OAK_SIGN);
|
||||
clickHandler = (panel, user1, clickType, i) -> {
|
||||
this.settings.setShowCompletionTitle(!this.settings.isShowCompletionTitle());
|
||||
|
||||
|
@ -2,6 +2,7 @@ package world.bentobox.challenges.panel.user;
|
||||
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import java.util.List;
|
||||
@ -167,7 +168,7 @@ public class ChallengesGUI extends CommonGUI
|
||||
if (this.freeChallengeIndex > 0)
|
||||
{
|
||||
panelBuilder.item(index++, new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.previous")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.freeChallengeIndex--;
|
||||
@ -191,7 +192,7 @@ public class ChallengesGUI extends CommonGUI
|
||||
else if (currentIndex < freeChallengesCount)
|
||||
{
|
||||
panelBuilder.item(index, new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.next")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.freeChallengeIndex++;
|
||||
@ -243,7 +244,7 @@ public class ChallengesGUI extends CommonGUI
|
||||
if (this.pageIndex > 0)
|
||||
{
|
||||
panelBuilder.item(index++, new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.previous")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.pageIndex--;
|
||||
@ -267,7 +268,7 @@ public class ChallengesGUI extends CommonGUI
|
||||
else if (currentIndex < challengesCount)
|
||||
{
|
||||
panelBuilder.item(index, new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.next")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.pageIndex++;
|
||||
@ -304,7 +305,7 @@ public class ChallengesGUI extends CommonGUI
|
||||
if (this.levelIndex > 0)
|
||||
{
|
||||
panelBuilder.item(index++, new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.previous")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.levelIndex--;
|
||||
@ -328,7 +329,7 @@ public class ChallengesGUI extends CommonGUI
|
||||
else if (currentIndex < levelCounts)
|
||||
{
|
||||
panelBuilder.item(index, new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.next")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.levelIndex++;
|
||||
|
@ -145,7 +145,7 @@ public class SelectBlocksGUI
|
||||
|
||||
panelBuilder.item(18,
|
||||
new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.previous")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.build(correctPage - 1);
|
||||
@ -154,7 +154,7 @@ public class SelectBlocksGUI
|
||||
|
||||
panelBuilder.item(26,
|
||||
new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.next")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.build(correctPage + 1);
|
||||
|
@ -76,7 +76,7 @@ public class SelectChallengeGUI
|
||||
|
||||
panelBuilder.item(18,
|
||||
new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.previous")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.build(correctPage - 1);
|
||||
@ -85,7 +85,7 @@ public class SelectChallengeGUI
|
||||
|
||||
panelBuilder.item(26,
|
||||
new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.next")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.build(correctPage + 1);
|
||||
|
@ -115,7 +115,7 @@ public class SelectEntityGUI
|
||||
|
||||
panelBuilder.item(18,
|
||||
new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.previous")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.build(correctPage - 1);
|
||||
@ -124,7 +124,7 @@ public class SelectEntityGUI
|
||||
|
||||
panelBuilder.item(26,
|
||||
new PanelItemBuilder().
|
||||
icon(ChallengesAddon.SIGN_MATERIAL).
|
||||
icon(Material.OAK_SIGN).
|
||||
name(this.user.getTranslation("challenges.gui.buttons.next")).
|
||||
clickHandler((panel, user1, clickType, slot) -> {
|
||||
this.build(correctPage + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user