Interface WorldPurger

  • All Known Implementing Classes:
    SimpleWorldPurger

    public interface WorldPurger
    Used to remove animals from worlds that don't belong there.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void purgeWorld​(MultiverseWorld world)
      Convenience method for purgeWorld(MultiverseWorld, java.util.List, boolean, boolean) that takes the settings from the world-config.
      void purgeWorld​(MultiverseWorld mvworld, java.util.List<java.lang.String> thingsToKill, boolean negateAnimals, boolean negateMonsters)
      Clear all animals/monsters that do not belong to a world according to the config.
      void purgeWorld​(MultiverseWorld mvworld, java.util.List<java.lang.String> thingsToKill, boolean negateAnimals, boolean negateMonsters, org.bukkit.command.CommandSender sender)
      Clear all animals/monsters that do not belong to a world according to the config.
      void purgeWorlds​(java.util.List<MultiverseWorld> worlds)
      Synchronizes the given worlds with their settings.
      boolean shouldWeKillThisCreature​(MultiverseWorld w, org.bukkit.entity.Entity e)
      Determines whether the specified creature should be killed and automatically reads the params from a world object.
      boolean shouldWeKillThisCreature​(org.bukkit.entity.Entity e, java.util.List<java.lang.String> thingsToKill, boolean negateAnimals, boolean negateMonsters)
      Determines whether the specified creature should be killed.
    • Method Detail

      • purgeWorlds

        void purgeWorlds​(java.util.List<MultiverseWorld> worlds)
        Synchronizes the given worlds with their settings.
        Parameters:
        worlds - A list of MultiverseWorld
      • purgeWorld

        void purgeWorld​(MultiverseWorld mvworld,
                        java.util.List<java.lang.String> thingsToKill,
                        boolean negateAnimals,
                        boolean negateMonsters)
        Clear all animals/monsters that do not belong to a world according to the config.
        Parameters:
        mvworld - The MultiverseWorld.
        thingsToKill - A List of animals/monsters to be killed.
        negateAnimals - Whether the monsters in the list should be negated.
        negateMonsters - Whether the animals in the list should be negated.
      • purgeWorld

        void purgeWorld​(MultiverseWorld mvworld,
                        java.util.List<java.lang.String> thingsToKill,
                        boolean negateAnimals,
                        boolean negateMonsters,
                        org.bukkit.command.CommandSender sender)
        Clear all animals/monsters that do not belong to a world according to the config.
        Parameters:
        mvworld - The MultiverseWorld.
        thingsToKill - A List of animals/monsters to be killed.
        negateAnimals - Whether the monsters in the list should be negated.
        negateMonsters - Whether the animals in the list should be negated.
        sender - The CommandSender that initiated the action. He will/should be notified.
      • shouldWeKillThisCreature

        boolean shouldWeKillThisCreature​(org.bukkit.entity.Entity e,
                                         java.util.List<java.lang.String> thingsToKill,
                                         boolean negateAnimals,
                                         boolean negateMonsters)
        Determines whether the specified creature should be killed.
        Parameters:
        e - The creature.
        thingsToKill - A List of animals/monsters to be killed.
        negateAnimals - Whether the monsters in the list should be negated.
        negateMonsters - Whether the animals in the list should be negated.
        Returns:
        true if the creature should be killed, otherwise false.
      • shouldWeKillThisCreature

        boolean shouldWeKillThisCreature​(MultiverseWorld w,
                                         org.bukkit.entity.Entity e)
        Determines whether the specified creature should be killed and automatically reads the params from a world object.
        Parameters:
        w - The world.
        e - The creature.
        Returns:
        true if the creature should be killed, otherwise false.