bug fix in PlayerHelper

This commit is contained in:
Kiran Hart 2021-03-24 17:35:49 -04:00
parent 9d7fbe20a0
commit 374051d99b
4 changed files with 6 additions and 3 deletions

View File

@ -126,7 +126,7 @@
<dependency> <dependency>
<groupId>ca.tweetzy</groupId> <groupId>ca.tweetzy</groupId>
<artifactId>tweetycore</artifactId> <artifactId>tweetycore</artifactId>
<version>1.0.0</version> <version>2.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.MilkBowl</groupId> <groupId>com.github.MilkBowl</groupId>

View File

@ -55,7 +55,6 @@ public class AuctionHouse extends TweetyPlugin {
@Override @Override
public void onPluginEnable() { public void onPluginEnable() {
TweetyCore.registerPlugin(this, (int) PluginID.AUCTION_HOUSE.getTweetzyID(), "CHEST"); TweetyCore.registerPlugin(this, (int) PluginID.AUCTION_HOUSE.getTweetzyID(), "CHEST");
TweetyCore.initEvents(this);
// Check server version // Check server version
if (ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_7)) { if (ServerVersion.isServerVersionAtOrBelow(ServerVersion.V1_7)) {

View File

@ -13,6 +13,6 @@ import org.bukkit.inventory.ItemStack;
public class PlayerHelper { public class PlayerHelper {
public static ItemStack getHeldItem(Player player) { public static ItemStack getHeldItem(Player player) {
return ServerVersion.isServerVersionAbove(ServerVersion.V1_8) ? player.getInventory().getItemInHand() : player.getInventory().getItemInMainHand(); return ServerVersion.isServerVersionAbove(ServerVersion.V1_8) ? player.getInventory().getItemInMainHand() : player.getInventory().getItemInHand();
} }
} }

View File

@ -24,6 +24,7 @@ permissions:
auctionhouse.cmd.expired: true auctionhouse.cmd.expired: true
auctionhouse.cmd.settings: true auctionhouse.cmd.settings: true
auctionhouse.cmd.transactions: true auctionhouse.cmd.transactions: true
auctionhouse.cmd.search: true
auctionhouse.cmd: auctionhouse.cmd:
description: Allows the user to use /ah description: Allows the user to use /ah
default: op default: op
@ -41,4 +42,7 @@ permissions:
default: op default: op
auctionhouse.cmd.transactions: auctionhouse.cmd.transactions:
description: Allows the user to open the transactions menu description: Allows the user to open the transactions menu
default: op
auctionhouse.cmd.search:
description: Allows the user to search for auction items.
default: op default: op