Revert "Remove overloading `WorldCore#getSpawner(CreatureSpawner)`"

This reverts commit 1cd96b10c5.
This commit is contained in:
Christian Koop 2022-08-28 19:19:48 +02:00
parent c725ea69d6
commit 7c09845789
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
22 changed files with 102 additions and 1 deletions

View File

@ -478,7 +478,7 @@ public class ItemUtils {
/**
* Quickly check to see if the two items use the same material. <br />
* NOTE: Does not check metadata; only checks the item material.
* NOTE: Does not check meta data; only checks the item material.
*
* @param is1 first item to compare
* @param is2 item to compare against

View File

@ -10,6 +10,8 @@ import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
public interface WorldCore {
SSpawner getSpawner(CreatureSpawner spawner);
SSpawner getSpawner(Location location);
SItemStack getItemStack(ItemStack item);

View File

@ -25,6 +25,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);

View File

@ -25,6 +25,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);

View File

@ -25,6 +25,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);

View File

@ -24,6 +24,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);

View File

@ -24,6 +24,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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -29,6 +29,11 @@ import org.jetbrains.annotations.NotNull;
import java.util.Objects;
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);

View File

@ -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);

View File

@ -25,6 +25,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);

View File

@ -25,6 +25,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);

View File

@ -25,6 +25,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);

View File

@ -25,6 +25,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);

View File

@ -25,6 +25,10 @@ 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) {