mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix reward inventory exploit in dungeons
This commit is contained in:
parent
843491937a
commit
de5cfee76a
@ -105,6 +105,9 @@ public class RewardListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPlayerMove(PlayerMoveEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
if (DungeonsXL.getDWorlds().getInstanceByWorld(player.getWorld()) != null) {
|
||||
return;
|
||||
}
|
||||
DLootInventory inventory = DLootInventory.getByPlayer(player);
|
||||
if (inventory != null && player.getLocation().getBlock().getRelative(0, 1, 0).getType() != Material.PORTAL && player.getLocation().getBlock().getRelative(0, -1, 0).getType() != Material.PORTAL
|
||||
&& player.getLocation().getBlock().getRelative(1, 0, 0).getType() != Material.PORTAL && player.getLocation().getBlock().getRelative(-1, 0, 0).getType() != Material.PORTAL
|
||||
|
Loading…
Reference in New Issue
Block a user