/** * Creates a new GraveYardSign / SpawnChest with the given {@link PlayerDropModificator} * * @param piMod * @return the list of Items NOT saved */ public List<ItemStack> createSpawnContainer(PlayerDropModificator piMod) { Player player = piMod.getPlayer(); piMod.modifyForSpawnContainer(); World world = piMod.getPlayer().getWorld(); if (worldIsOnIgnore(world)) { return piMod.getTransferredItems(); } if (!DeathChest.getPlugin() .getPermissionsManager() .checkPermissionsSilent(player, PermissionNode.spawnChest)) { return (piMod.getTransferredItems()); } Class<?> clazz = plugin.getConfigManager().getSpawnContainerUsage(); if (clazz == null) return piMod.getTransferredItems(); if (clazz.equals(SpawnChest.class)) return spawnChest(piMod); if (clazz.equals(SpawnSign.class)) return createSign(piMod); return null; }
public SpawnContainerController() { plugin = DeathChest.getPlugin(); signs = new ArrayList<SpawnSign>(); chests = new ArrayList<SpawnChest>(); new SpawnContainerTicker(); loadAllSigns(); RandomText.createDefaults(); }
public SpawnContainerTicker() { plugin = DeathChest.getPlugin(); Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, this, 20, 20); }