I think you should change lines 245 and 246 to:
if (cupboard.IsAuthed(player)) {
playercups.Add(entity);
}The current version doesn't seem to correctly count owned cupboards and sometimes counts all cupboards in the server preventing players from placing any cupbaords.