# 类的使用
org.bukkit.block.spawner.SpawnRule

使用SpawnRule的程序包
程序包
说明
org.bukkit.block.spawner
Classes relevant to mob spawners.
org.bukkit.spawner
Classes related to entity spawners.

- ## org.bukkit.block.spawner中SpawnRule的使用

  返回SpawnRule的org.bukkit.block.spawner中的方法
  修饰符和类型
  方法
  说明
  `@NotNull SpawnRule`
  SpawnRule.`clone()`
  `static @NotNull SpawnRule`
  SpawnRule.`deserialize(@NotNull Map<String,Object> args)`
  `@Nullable SpawnRule`
  SpawnerEntry.`getSpawnRule()`
  Gets a copy of the `SpawnRule` for this SpawnerEntry, or null if none has been set.
  参数类型为SpawnRule的org.bukkit.block.spawner中的方法
  修饰符和类型
  方法
  说明
  `void`
  SpawnerEntry.`setSpawnRule(@Nullable SpawnRule spawnRule)`
  Sets the `SpawnRule` for this SpawnerEntry, null may be used to clear the current spawn rule.
  参数类型为SpawnRule的org.bukkit.block.spawner中的构造器
  限定符
  构造器
  说明
  ``
  `SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule)`
  ``
  `SpawnerEntry(@NotNull EntitySnapshot snapshot, int spawnWeight, @Nullable SpawnRule spawnRule, @Nullable SpawnerEntry.Equipment equipment)`

- ## org.bukkit.spawner中SpawnRule的使用

  参数类型为SpawnRule的org.bukkit.spawner中的方法
  修饰符和类型
  方法
  说明
  `void`
  BaseSpawner.`addPotentialSpawn(@NotNull EntitySnapshot snapshot, int weight, @Nullable SpawnRule spawnRule)`
  Adds a new `EntitySnapshot` to the list of entities this spawner can spawn.