Class RefWorld
java.lang.Object
xyz.srnyx.annoyingapi.reflection.org.bukkit.RefWorld
org.bukkit.World
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @Nullable Method1.13+org.bukkit.World#getGameRuleValue(org.bukkit.GameRule<T>)static final @Nullable Method1.11+ org.bukkit.World#playSound(Location, Sound, SoundCategory, float, float)static final @Nullable Method1.13+org.bukkit.World#setGameRuleValue(org.bukkit.GameRule<T>, T) -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable StringgetGameRuleValue(@NotNull org.bukkit.World world, @NotNull String legacyName, @Nullable Object modernEnum) Gets a game rule value from a worldstatic voidsetGameRuleValue(@NotNull org.bukkit.World world, @NotNull String legacyName, @Nullable Object modernEnum, @NotNull Object value) Sets a game rule value in a world
-
Field Details
-
WORLD_GET_GAME_RULE_VALUE_METHOD
1.13+org.bukkit.World#getGameRuleValue(org.bukkit.GameRule<T>) -
WORLD_SET_GAME_RULE_VALUE_METHOD
1.13+org.bukkit.World#setGameRuleValue(org.bukkit.GameRule<T>, T) -
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- theWorldlegacyName- the legacy name of the game rule for 1.13-modernEnum- the modern enum of the game rule for 1.13+, get it fromRefGameRule- 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- theWorldlegacyName- the legacy name of the game rule for 1.13-modernEnum- the modern enum of the game rule for 1.13+, get it fromRefGameRulevalue- the value to set
-