forked from GeyserMC/Geyser
Use Java Edition username when getting player in bukkit world manager
This commit is contained in:
parent
da02989967
commit
3c7e89ba3f
1 changed files with 4 additions and 1 deletions
|
@ -37,6 +37,9 @@ public class GeyserBukkitWorldManager extends WorldManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getBlockAt(GeyserSession session, int x, int y, int z) {
|
public BlockState getBlockAt(GeyserSession session, int x, int y, int z) {
|
||||||
return BlockTranslator.getJavaIdBlockMap().get(Bukkit.getPlayer(session.getName()).getWorld().getBlockAt(x, y, z).getBlockData().getAsString());
|
if (session.getPlayerEntity() == null) {
|
||||||
|
return BlockTranslator.AIR;
|
||||||
|
}
|
||||||
|
return BlockTranslator.getJavaIdBlockMap().get(Bukkit.getPlayer(session.getPlayerEntity().getUsername()).getWorld().getBlockAt(x, y, z).getBlockData().getAsString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue