Skip to content

Commit 41ed974

Browse files
Merge pull request #187 from Promises/admin-limit
Administators cannot drop items
2 parents 7bcfa01 + 37ef1d5 commit 41ed974

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plugins/items/drop-item-plugin.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export const action: itemAction = (details) => {
1515
return;
1616
}
1717

18+
if(player.rights == 2) {
19+
player.sendMessage('Administrators are not allowed to drop items.', true);
20+
return;
21+
}
22+
1823
inventory.remove(itemSlot);
1924
player.outgoingPackets.sendUpdateSingleWidgetItem(widgets.inventory, itemSlot, null);
2025
player.playSound(soundIds.dropItem, 5);

0 commit comments

Comments
 (0)