mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
More item request validation
This commit is contained in:
parent
f6c240262d
commit
394ed99616
1 changed files with 1 additions and 1 deletions
|
|
@ -405,7 +405,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
|
||||
@Remote(called = Loc.server, targets = Loc.both, forward = true)
|
||||
public static void requestItem(Player player, Building build, Item item, int amount){
|
||||
if(player == null || build == null || !build.interactable(player.team()) || !player.within(build, itemTransferRange) || player.dead()) return;
|
||||
if(player == null || build == null || !build.interactable(player.team()) || !player.within(build, itemTransferRange) || player.dead() || amount <= 0) return;
|
||||
|
||||
if(net.server() && (!Units.canInteract(player, build) ||
|
||||
!netServer.admins.allowAction(player, ActionType.withdrawItem, build.tile(), action -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue