mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
This commit is contained in:
@@ -544,6 +544,11 @@ impl BedrockClient {
|
||||
let block = world.get_block(&data.block_position);
|
||||
let server = world.server.upgrade().expect("Server is gone");
|
||||
|
||||
if player.gamemode.load() == GameMode::Spectator {
|
||||
// TODO: openMenu ?
|
||||
return;
|
||||
}
|
||||
|
||||
if data.action_type.0 == 0 {
|
||||
// Click block
|
||||
let held_item = player.inventory.held_item();
|
||||
|
||||
@@ -2159,8 +2159,10 @@ impl JavaClient {
|
||||
return Err(BlockPlacingError::InvalidHand);
|
||||
};
|
||||
|
||||
//TODO this.player.resetLastActionTime();
|
||||
//TODO this.gameModeForPlayer == GameType.SPECTATOR
|
||||
if player.gamemode.load() == GameMode::Spectator {
|
||||
// TODO: openMenu
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let inventory = player.inventory();
|
||||
let held_item = inventory.held_item();
|
||||
|
||||
Reference in New Issue
Block a user