NPCLib/api/src/main/java/net/jitse/npclib/internal/NPCManager.java

34 lines
596 B
Java
Raw Normal View History

2018-04-26 13:52:49 +02:00
/*
* Copyright (c) 2018 Jitse Boonstra
*/
2019-08-03 13:47:12 +02:00
package net.jitse.npclib.internal;
2018-04-26 13:52:49 +02:00
import java.util.HashSet;
import java.util.Set;
/**
* @author Jitse Boonstra
*/
public final class NPCManager {
2019-08-03 13:47:12 +02:00
private static Set<SimpleNPC> npcs = new HashSet<>();
2018-04-26 13:52:49 +02:00
2019-08-03 13:47:12 +02:00
public static Set<SimpleNPC> getAllNPCs() {
2018-04-26 13:52:49 +02:00
return npcs;
}
2019-08-03 13:47:12 +02:00
public static void add(SimpleNPC npc) {
2018-04-26 13:52:49 +02:00
npcs.add(npc);
}
2019-08-03 13:47:12 +02:00
public static void remove(SimpleNPC npc) {
2018-04-26 13:52:49 +02:00
npcs.remove(npc);
}
private NPCManager() {
throw new SecurityException("You cannot initialize this class.");
}
}