Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Watzko
ShowCaseStandalone
Commits
43b3c829
Commit
43b3c829
authored
Nov 25, 2020
by
Sailoriae
Browse files
Fix the "unable to drop air" problem
parent
ab9c8fab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/com/kellerkindt/scs/internals/SimpleShopHandler.java
View file @
43b3c829
...
...
@@ -746,11 +746,12 @@ public class SimpleShopHandler implements ShopHandler, Listener {
* !! Mobs can pick the Item up, but do not drop it, since it has an amount of 0,
* although they can use it ^^
*/
itemStack
.
setAmount
(
scs
.
getConfiguration
().
getSpawnCount
());
// since mc 1.11 an amount of zero does not seem to work anymore?
if
(
itemStack
.
getAmount
()
==
0
)
{
// Warning : When setAmount(0), PaperMC resets the ItemStack to Material.AIR (Not Spigot)
if
(
scs
.
getConfiguration
().
getSpawnCount
()
==
0
)
{
itemStack
.
setAmount
(
1
);
}
else
{
itemStack
.
setAmount
(
scs
.
getConfiguration
().
getSpawnCount
());
}
}
if
(
itemStack
.
getType
()
!=
Material
.
AIR
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment