mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
realize spawneggservice is useless
This commit is contained in:
parent
262b600b11
commit
639365bd52
@ -9,11 +9,12 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class SpawnEggListener extends PlexListener
|
||||
{
|
||||
public static List<Material> SPAWN_EGGS;
|
||||
public static final List<Material> SPAWN_EGGS = Arrays.stream(Material.values()).filter((mat) -> mat.name().endsWith("_SPAWN_EGG")).toList();
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onPlayerInteract(PlayerInteractEvent event)
|
||||
|
@ -5,7 +5,6 @@ import dev.plex.Plex;
|
||||
import dev.plex.services.impl.AutoWipeService;
|
||||
import dev.plex.services.impl.BanService;
|
||||
import dev.plex.services.impl.GameRuleService;
|
||||
import dev.plex.services.impl.SpawnEggService;
|
||||
import dev.plex.services.impl.UpdateCheckerService;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
@ -21,7 +20,6 @@ public class ServiceManager
|
||||
registerService(new BanService());
|
||||
registerService(new GameRuleService());
|
||||
registerService(new UpdateCheckerService());
|
||||
registerService(new SpawnEggService());
|
||||
registerService(new AutoWipeService());
|
||||
}
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
package dev.plex.services.impl;
|
||||
|
||||
import dev.plex.listener.impl.SpawnEggListener;
|
||||
import dev.plex.services.AbstractService;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class SpawnEggService extends AbstractService
|
||||
{
|
||||
public SpawnEggService() {
|
||||
super(false, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
SpawnEggListener.SPAWN_EGGS = Arrays.stream(Material.values()).filter((mat) -> mat.name().endsWith("_SPAWN_EGG")).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int repeatInSeconds() {
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user