Added trapped chest, hopper, and dropper to recognized container list

Also updated CB lib and cleaned up some leftover code
This commit is contained in:
Brettflan 2013-04-23 08:52:59 -05:00
parent 190b42b66e
commit cd6f769572
3 changed files with 3 additions and 31 deletions

Binary file not shown.

View File

@ -305,6 +305,9 @@ public class Conf
materialsContainer.add(Material.ENCHANTMENT_TABLE);
materialsContainer.add(Material.ANVIL);
materialsContainer.add(Material.BEACON);
materialsContainer.add(Material.TRAPPED_CHEST);
materialsContainer.add(Material.DROPPER);
materialsContainer.add(Material.HOPPER);
materialsEditOnInteract.add(Material.DIODE_BLOCK_OFF);
materialsEditOnInteract.add(Material.DIODE_BLOCK_ON);

View File

@ -47,35 +47,4 @@ public class FPlayers extends PlayerEntityCollection<FPlayer>
}
}
}
public void autoLeaveOnInactivityRoutine()
{
if (Conf.autoLeaveAfterDaysOfInactivity <= 0.0)
{
return;
}
long now = System.currentTimeMillis();
double toleranceMillis = Conf.autoLeaveAfterDaysOfInactivity * 24 * 60 * 60 * 1000;
for (FPlayer fplayer : FPlayers.i.get())
{
if (fplayer.isOffline() && now - fplayer.getLastLoginTime() > toleranceMillis)
{
if (Conf.logFactionLeave || Conf.logFactionKick)
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");
// if player is faction leader, sort out the faction since he's going away
if (fplayer.getRole() == Rel.LEADER)
{
Faction faction = fplayer.getFaction();
if (faction != null)
fplayer.getFaction().promoteNewLeader();
}
fplayer.leave(false);
fplayer.detach();
}
}
}
}