mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-02-18 05:11:24 +01:00
fix: check the player is in the same world
This commit is contained in:
parent
f9f5a9d1f2
commit
8018d68e42
@ -16,6 +16,7 @@ import com.sekwah.advancedportals.core.warphandler.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author sekwah41
|
* @author sekwah41
|
||||||
@ -153,7 +154,7 @@ public class AdvancedPortal implements TagTarget {
|
|||||||
double playerY = loc.posY;
|
double playerY = loc.posY;
|
||||||
double playerZ = loc.posZ;
|
double playerZ = loc.posZ;
|
||||||
|
|
||||||
return playerX >= this.minLoc.posX - additionalArea &&
|
return Objects.equals(loc.worldName, this.minLoc.worldName) && playerX >= this.minLoc.posX - additionalArea &&
|
||||||
playerX < this.maxLoc.posX + 1 + additionalArea &&
|
playerX < this.maxLoc.posX + 1 + additionalArea &&
|
||||||
playerY >= this.minLoc.posY - additionalArea &&
|
playerY >= this.minLoc.posY - additionalArea &&
|
||||||
playerY < this.maxLoc.posY + 1 + additionalArea &&
|
playerY < this.maxLoc.posY + 1 + additionalArea &&
|
||||||
|
@ -8,19 +8,4 @@ import com.sekwah.advancedportals.core.serializeddata.PlayerData;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public interface IPlayerDataRepository extends IJsonRepository<PlayerData> {
|
public interface IPlayerDataRepository extends IJsonRepository<PlayerData> {
|
||||||
void addSelectedPortal(UUID selectedPlayer, String portal);
|
|
||||||
|
|
||||||
void removeSelectedPortal(UUID uuid);
|
|
||||||
|
|
||||||
void addSelectedPosition(UUID uuid, boolean isPos1, BlockLocation portalLocation);
|
|
||||||
|
|
||||||
void removeSelectedPosition(UUID uuid, boolean isPos1);
|
|
||||||
|
|
||||||
void removeAllSelectedHand(UUID uuid);
|
|
||||||
|
|
||||||
void activateCooldown(PlayerContainer player);
|
|
||||||
|
|
||||||
void playerLeave(PlayerContainer player);
|
|
||||||
|
|
||||||
boolean inPortalRegion(PlayerLocation loc);
|
|
||||||
}
|
}
|
||||||
|
@ -49,44 +49,4 @@ public class PlayerDataRepositoryImpl implements IPlayerDataRepository {
|
|||||||
public List<PlayerData> getAll() {
|
public List<PlayerData> getAll() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addSelectedPortal(UUID selectedPlayer, String portal) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeSelectedPortal(UUID uuid) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addSelectedPosition(UUID uuid, boolean isPos1, BlockLocation portalLocation) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeSelectedPosition(UUID uuid, boolean isPos1) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeAllSelectedHand(UUID uuid) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void activateCooldown(PlayerContainer player) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void playerLeave(PlayerContainer player) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean inPortalRegion(PlayerLocation loc) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user