mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-11-12 23:04:01 +01:00
Allow the player to create a shop if the "chest-access" flag is set
This commit is contained in:
parent
63c7b677f5
commit
b6eb7f7d91
@ -3,6 +3,7 @@ package de.epiceric.shopchest.external.worldguard;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldguard.protection.flags.Flags;
|
||||
import de.epiceric.shopchest.hook.CreateShopHook;
|
||||
import de.epiceric.shopchest.hook.ExtendShopHook;
|
||||
import org.bukkit.block.Block;
|
||||
@ -28,7 +29,7 @@ public class WGCreateHook extends WGHook implements CreateShopHook, ExtendShopHo
|
||||
final World world = BukkitAdapter.adapt(newestBlock.getWorld());
|
||||
final List<Location> locations = getLocations(world, currentShopBlocks);
|
||||
locations.add(getLocation(world, newestBlock));
|
||||
return test(locations, null, registry.getCreate().get());
|
||||
return test(locations, player, Flags.CHEST_ACCESS, registry.getCreate().get());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user