mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-06-26 06:24:42 +02:00
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:
parent
190b42b66e
commit
cd6f769572
Binary file not shown.
|
@ -305,6 +305,9 @@ public class Conf
|
||||||
materialsContainer.add(Material.ENCHANTMENT_TABLE);
|
materialsContainer.add(Material.ENCHANTMENT_TABLE);
|
||||||
materialsContainer.add(Material.ANVIL);
|
materialsContainer.add(Material.ANVIL);
|
||||||
materialsContainer.add(Material.BEACON);
|
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_OFF);
|
||||||
materialsEditOnInteract.add(Material.DIODE_BLOCK_ON);
|
materialsEditOnInteract.add(Material.DIODE_BLOCK_ON);
|
||||||
|
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user