mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 10:35:18 +01:00
Deprecates WorldCore#getSpawner(CreatureSpawner)
It is a hussle to implement this method in every NMS version and doesn't provide much value.
Related to:
* e7bb4bf7634cfb27199fa88e047d138a896a229e
* 1cd96b10c5
This commit is contained in:
parent
7c09845789
commit
0906cbf9c8
@ -10,6 +10,10 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface WorldCore {
|
||||
/**
|
||||
* @deprecated Use {@link #getSpawner(Location)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
SSpawner getSpawner(CreatureSpawner spawner);
|
||||
|
||||
SSpawner getSpawner(Location location);
|
||||
|
@ -26,6 +26,11 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class WorldCoreImpl implements WorldCore {
|
||||
@Override
|
||||
public SSpawner getSpawner(CreatureSpawner spawner) {
|
||||
return new SSpawnerImpl(spawner.getLocation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SSpawner getSpawner(Location location) {
|
||||
return new SSpawnerImpl(location);
|
||||
|
@ -27,6 +27,11 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class WorldCoreImpl implements WorldCore {
|
||||
@Override
|
||||
public SSpawner getSpawner(CreatureSpawner spawner) {
|
||||
return new SSpawnerImpl(spawner.getLocation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SSpawner getSpawner(Location location) {
|
||||
return new SSpawnerImpl(location);
|
||||
|
Loading…
Reference in New Issue
Block a user