Add permission to allow a user to drop banned items.
This commit is contained in:
parent
ace810c8b3
commit
1fb6ab4eee
2 changed files with 4 additions and 1 deletions
|
|
@ -2961,7 +2961,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
Item item = new Item();
|
Item item = new Item();
|
||||||
item.netDefaults(type);
|
item.netDefaults(type);
|
||||||
if (stacks > item.maxStack || TShock.Itembans.ItemIsBanned(item.name, args.Player))
|
if ((stacks > item.maxStack || stacks <= 0) || (TShock.Itembans.ItemIsBanned(item.name, args.Player) && !args.Player.Group.HasPermission(Permissions.allowdroppingbanneditems)))
|
||||||
{
|
{
|
||||||
args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,9 @@ namespace TShockAPI
|
||||||
[Description("Allow unrestricted SendTileSquare usage, for client side world editing.")]
|
[Description("Allow unrestricted SendTileSquare usage, for client side world editing.")]
|
||||||
public static readonly string allowclientsideworldedit = "tshock.ignore.sendtilesquare";
|
public static readonly string allowclientsideworldedit = "tshock.ignore.sendtilesquare";
|
||||||
|
|
||||||
|
[Description("Allow dropping banned items without the item being eaten.")]
|
||||||
|
public static readonly string allowdroppingbanneditems = "tshock.ignore.dropbanneditem";
|
||||||
|
|
||||||
// tshock.item nodes
|
// tshock.item nodes
|
||||||
|
|
||||||
[Description("User can spawn items.")]
|
[Description("User can spawn items.")]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue