java.lang.Object
xyz.srnyx.annoyingapi.reflection.org.bukkit.RefWorld

public class RefWorld extends Object
org.bukkit.World
  • Field Details

    • WORLD_GET_GAME_RULE_VALUE_METHOD

      @Nullable public static final @Nullable Method WORLD_GET_GAME_RULE_VALUE_METHOD
      1.13+ org.bukkit.World#getGameRuleValue(org.bukkit.GameRule<T>)
    • WORLD_SET_GAME_RULE_VALUE_METHOD

      @Nullable public static final @Nullable Method WORLD_SET_GAME_RULE_VALUE_METHOD
      1.13+ org.bukkit.World#setGameRuleValue(org.bukkit.GameRule<T>, T)
    • WORLD_PLAY_SOUND_METHOD

      @Nullable public static final @Nullable Method WORLD_PLAY_SOUND_METHOD
      1.11+ org.bukkit.World#playSound(Location, Sound, SoundCategory, float, float)
  • Method Details

    • getGameRuleValue

      @Nullable public static @Nullable String getGameRuleValue(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull String legacyName, @Nullable @Nullable Object modernEnum)
      Gets a game rule value from a world
      Parameters:
      world - the World
      legacyName - the legacy name of the game rule for 1.13-
      modernEnum - the modern enum of the game rule for 1.13+, get it from RefGameRule
      Returns:
      the game rule value, or null if not found
    • setGameRuleValue

      public static void setGameRuleValue(@NotNull @NotNull org.bukkit.World world, @NotNull @NotNull String legacyName, @Nullable @Nullable Object modernEnum, @NotNull @NotNull Object value)
      Sets a game rule value in a world
      Parameters:
      world - the World
      legacyName - the legacy name of the game rule for 1.13-
      modernEnum - the modern enum of the game rule for 1.13+, get it from RefGameRule
      value - the value to set