From 70e069dc051b1039ad9321b341f1e6803e59e0e3 Mon Sep 17 00:00:00 2001 From: ProSavage Date: Sat, 11 Aug 2018 01:14:18 -0500 Subject: [PATCH] Banners now work in 1.7-1.13 ( Tested ) --- pom.xml | 2 +- .../java/com/massivecraft/factions/cmd/CmdBanner.java | 10 +++++++++- .../com/massivecraft/factions/cmd/CmdSetBanner.java | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a77131c3..26f36cff 100644 --- a/pom.xml +++ b/pom.xml @@ -297,7 +297,7 @@ com.drtshock PlayerVaultsX - 4.0.6-SNAPSHOT + 4.0.6 provided diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java b/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java index 60175fdc..b3457ecd 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java @@ -52,7 +52,15 @@ public void perform() { } else { - warBanner = P.p.createItem(Material.LEGACY_BANNER, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore")); + Material banner; + if (!P.p.mc113) { + banner = Material.valueOf("BANNER"); + } else { + banner = Material.valueOf("LEGACY_BANNER"); + } + + + warBanner = P.p.createItem(banner, 1, (short) 1, P.p.getConfig().getString("fbanners.Item.Name"), P.p.getConfig().getStringList("fbanners.Item.Lore")); } fme.msg(TL.COMMAND_BANNER_SUCCESS); warBanner.setAmount(1); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java b/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java index f06d7ee3..6fb554c6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java @@ -20,7 +20,7 @@ public CmdSetBanner() { } public void perform() { - if (me.getItemInHand().getType() != Material.LEGACY_BANNER) { + if (!me.getItemInHand().getType().toString().contains("BANNER")) { fme.msg(TL.COMMAND_SETBANNER_NOTBANNER); return; }