Skip to content

Commit

Permalink
Fix: #195
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Oct 29, 2024
1 parent 89640fe commit 74c4662
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,6 @@ body:
options:
- label: I confirm this is not a duplicate.
required: true
- type: input
id: os
attributes:
label: Operating System
description: What operating system are you using?
placeholder: "Example: macOS Big Sur"
validations:
required: true
- type: input
id: version
attributes:
label: Server Software Version/Commit
description: What Server Software Version/Commit are you using?
placeholder: "Example: 1.0.0/39b4cb3"
validations:
required: true
- type: textarea
id: problem
attributes:
Expand Down
15 changes: 10 additions & 5 deletions pumpkin/src/client/player_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,16 @@ impl Player {
if self.gamemode.load() != GameMode::Creative {
return Err(InventoryError::PermissionError);
}
self.inventory.lock().await.set_slot(
packet.slot as usize,
packet.clicked_item.to_item(),
false,
)
let valid_slot = packet.slot >= 1 && packet.slot <= 45;
if valid_slot {
self.inventory.lock().await.set_slot(
packet.slot as usize,
packet.clicked_item.to_item(),
false,
)?;
};
// TODO: The Item was droped per drag and drop,
Ok(())
}

// TODO:
Expand Down

0 comments on commit 74c4662

Please sign in to comment.