Fixed InstanceWorld allowed player methods.

Thanks to Lito.
This commit is contained in:
MobiusDevelopment
2022-01-04 23:59:59 +00:00
parent d976ea9556
commit f843d41d61
2 changed files with 26 additions and 12 deletions

View File

@@ -84,22 +84,29 @@ public class InstanceWorld
public void removeAllowed(Player player)
{
final Integer playerId = player.getId();
_allowed.remove(playerId);
_allowed.remove(player.getObjectId());
}
/**
* Add player who can enter to instance.
* @param player player instance
*/
public void addAllowed(Player player)
{
final Integer playerId = player.getId();
if (!_allowed.contains(playerId))
if (!_allowed.contains(player.getObjectId()))
{
_allowed.add(playerId);
_allowed.add(player.getObjectId());
}
}
/**
* Check if player can enter to instance.
* @param player player itself
* @return {@code true} when can enter, otherwise {@code false}
*/
public boolean isAllowed(Player player)
{
return _allowed.contains(player.getId());
return _allowed.contains(player.getObjectId());
}
/**

View File

@@ -84,22 +84,29 @@ public class InstanceWorld
public void removeAllowed(Player player)
{
final Integer playerId = player.getId();
_allowed.remove(playerId);
_allowed.remove(player.getObjectId());
}
/**
* Add player who can enter to instance.
* @param player player instance
*/
public void addAllowed(Player player)
{
final Integer playerId = player.getId();
if (!_allowed.contains(playerId))
if (!_allowed.contains(player.getObjectId()))
{
_allowed.add(playerId);
_allowed.add(player.getObjectId());
}
}
/**
* Check if player can enter to instance.
* @param player player itself
* @return {@code true} when can enter, otherwise {@code false}
*/
public boolean isAllowed(Player player)
{
return _allowed.contains(player.getId());
return _allowed.contains(player.getObjectId());
}
/**