Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Banners now work in 1.7-1.13 ( Tested )
Browse files Browse the repository at this point in the history
  • Loading branch information
prosavage committed Aug 11, 2018
1 parent de3f0c4 commit 70e069d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
<dependency>
<groupId>com.drtshock</groupId>
<artifactId>PlayerVaultsX</artifactId>
<version>4.0.6-SNAPSHOT</version>
<version>4.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/massivecraft/factions/cmd/CmdBanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 70e069d

Please sign in to comment.