Someway somehow these events are no longer registered?
This commit is contained in:
@@ -7,6 +7,7 @@ import me.ryanhamshire.GriefPrevention.CreateClaimResult;
|
||||
import me.ryanhamshire.GriefPrevention.DataStore;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import me.ryanhamshire.GriefPrevention.Messages;
|
||||
import me.ryanhamshire.GriefPrevention.PlayerData;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -27,6 +28,7 @@ public class AltitudeListener implements Listener {
|
||||
public AltitudeListener(DataStore dataStore, GriefPrevention plugin) {
|
||||
this.plugin = plugin;
|
||||
this.worldInit();
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
}
|
||||
|
||||
private void info(String s) {
|
||||
@@ -100,7 +102,8 @@ public class AltitudeListener implements Listener {
|
||||
{
|
||||
if (event.getEntered() instanceof Player player)
|
||||
{
|
||||
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(player.getLocation(), true, null);
|
||||
PlayerData playerData = GriefPrevention.instance.dataStore.getPlayerData(player.getUniqueId());
|
||||
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(player.getLocation(), true, playerData.lastClaim);
|
||||
if (claim != null)
|
||||
{
|
||||
if (claim.allowAccess(player) != null)
|
||||
|
||||
Reference in New Issue
Block a user