mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 18:45:31 +01:00
Fix WordGuard + minor fixes
This commit is contained in:
parent
91c08045b8
commit
a058b80990
18
pom.xml
18
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.acrobot.chestshop</groupId>
|
||||
<artifactId>chestshop</artifactId>
|
||||
<version>3.7.17</version>
|
||||
<version>3.7.18</version>
|
||||
<description>Chest-and-sign shop plugin for Bukkit</description>
|
||||
|
||||
<scm>
|
||||
@ -128,14 +128,14 @@
|
||||
<finalName>ChestShop</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
|
@ -13,13 +13,13 @@ import java.util.UUID;
|
||||
@DatabaseTable(tableName = "accounts")
|
||||
public class Account {
|
||||
|
||||
@DatabaseField(id = true)
|
||||
@DatabaseField(id = true, canBeNull = false)
|
||||
private String name;
|
||||
|
||||
@DatabaseField(index = true)
|
||||
@DatabaseField(index = true, canBeNull = false)
|
||||
private String shortName;
|
||||
|
||||
@DatabaseField
|
||||
@DatabaseField(canBeNull = false)
|
||||
private UUID uuid;
|
||||
|
||||
public Account() {
|
||||
|
@ -3,6 +3,7 @@ package com.Acrobot.ChestShop.Listeners.Item;
|
||||
import com.Acrobot.Breeze.Utils.BlockUtil;
|
||||
import com.Acrobot.ChestShop.Signs.ChestShopSign;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
|
||||
@ -11,7 +12,7 @@ import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
*/
|
||||
public class ItemMoveListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
public static void onItemMove(InventoryMoveItemEvent event) {
|
||||
if (event.getSource() == null || !BlockUtil.isChest(event.getSource().getHolder())) {
|
||||
return;
|
||||
|
@ -45,6 +45,8 @@ public class WorldGuardProtection implements Listener {
|
||||
}
|
||||
|
||||
private boolean canAccess(LocalPlayer player, Block block, ApplicableRegionSet set) {
|
||||
return worldGuard.getGlobalRegionManager().hasBypass(player, block.getWorld()) || set.canBuild(player) || set.allows(DefaultFlag.CHEST_ACCESS, player);
|
||||
return worldGuard.getGlobalRegionManager().hasBypass(player, block.getWorld())
|
||||
|| set.testState(player, DefaultFlag.BUILD)
|
||||
|| set.testState(player, DefaultFlag.CHEST_ACCESS);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user