Don't allow breaking right-clickable tiles, fix /item and /give logic
This commit is contained in:
parent
e50386084c
commit
fde99208f5
2 changed files with 6 additions and 6 deletions
|
|
@ -4202,7 +4202,7 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
if (args.Player.InventorySlotAvailable || (item.name.Contains("Coin") && item.type != 905) || item.type == 58 || item.type == 184)
|
||||
if (args.Player.InventorySlotAvailable || (item.type > 70 && item.type < 75) || item.ammo > 0 || item.type == 58 || item.type == 184)
|
||||
{
|
||||
if (itemAmount == 0 || itemAmount > item.maxStack)
|
||||
itemAmount = item.maxStack;
|
||||
|
|
@ -4214,7 +4214,7 @@ namespace TShockAPI
|
|||
}
|
||||
else
|
||||
{
|
||||
args.Player.SendErrorMessage("The item is banned and the config prevents you from spawning banned items.");
|
||||
args.Player.SendErrorMessage("You cannot spawn banned items.");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -4282,7 +4282,7 @@ namespace TShockAPI
|
|||
else
|
||||
{
|
||||
var plr = players[0];
|
||||
if (plr.InventorySlotAvailable || (item.name.Contains("Coin") && item.type != 905) || item.type == 58 || item.type == 184)
|
||||
if (plr.InventorySlotAvailable || (item.type > 70 && item.type < 75) || item.ammo > 0 || item.type == 58 || item.type == 184)
|
||||
{
|
||||
if (itemAmount == 0 || itemAmount > item.maxStack)
|
||||
itemAmount = item.maxStack;
|
||||
|
|
@ -4293,7 +4293,7 @@ namespace TShockAPI
|
|||
}
|
||||
else
|
||||
{
|
||||
args.Player.SendErrorMessage("The item is banned and the config prevents spawning banned items.");
|
||||
args.Player.SendErrorMessage("You cannot spawn banned items.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue