Skip to content

Commit

Permalink
HotFix : fix cache qui met en cache seulement le propriétaire de l'ile
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Jan 27, 2024
1 parent 91e9b7b commit 137eaed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public CacheManager(SkyblockManager skyblockManager) {
}

public void updateCache(SkyblockManager skyblockManager, Player bPlayer) {
Island pIsland = skyblockManager.getIslandByOwner(bPlayer.getUniqueId()).join();
Island pIsland = skyblockManager.getIslandByPlayerId(bPlayer.getUniqueId()).join();
if (pIsland == null) {
// ========= remove player
PlayersInIslandCache.getIslandIdByPlayerId().remove(bPlayer.getUniqueId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void onLoadIslandInJoinEvent(PlayerJoinEvent playerJoinEvent) {
executor.execute(() -> {
Player player = playerJoinEvent.getPlayer();
SkyblockManager skyblockManager = this.api.getSkyblockManager();
Island island = skyblockManager.getIslandByOwner(player.getUniqueId()).join();
Island island = skyblockManager.getIslandByPlayerId(player.getUniqueId()).join();

if (island == null) {
PlayerUtils.teleportPlayerSpawn(this.api.getPlugin(), player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void teleportOtherWorld(Player player, PlayerPrepareChangeWorldSkyblockE
}
try {
WorldConfig worldConfig = event.getWorldConfig();
if (!WorldUtils.isWorldSkyblock(worldConfig.netherPortalDestination())) {
if (Boolean.FALSE.equals(WorldUtils.isWorldSkyblock(worldConfig.netherPortalDestination()))) {
logger.log(Level.ERROR, "The %s world is not a skyblock world!".formatted(worldConfig.netherPortalDestination()));
return;
}
Expand Down

0 comments on commit 137eaed

Please sign in to comment.