1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Merge pull request #3306 from svr333/SfCheatShiftRightClick

Co-authored-by: Daniel Walsh <walshydev@gmail.com>
This commit is contained in:
Daniel Walsh 2021-10-06 13:41:20 +01:00 committed by GitHub
commit 6c6ed306f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,7 +313,13 @@ public class SurvivalSlimefunGuide implements SlimefunGuideImplementation {
if (sfitem instanceof MultiBlockMachine) { if (sfitem instanceof MultiBlockMachine) {
Slimefun.getLocalization().sendMessage(pl, "guide.cheat.no-multiblocks"); Slimefun.getLocalization().sendMessage(pl, "guide.cheat.no-multiblocks");
} else { } else {
pl.getInventory().addItem(sfitem.getItem().clone()); ItemStack clonedItem = sfitem.getItem().clone();
if (action.isShiftClicked()) {
clonedItem.setAmount(clonedItem.getMaxStackSize());
}
pl.getInventory().addItem(clonedItem);
} }
} }
} catch (Exception | LinkageError x) { } catch (Exception | LinkageError x) {