Fixed npc not spawning and saving at all
This commit is contained in:
		
							parent
							
								
									d91d86ca88
								
							
						
					
					
						commit
						9c96be96db
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -136,7 +136,7 @@ public class NpcRegistryImpl implements NpcRegistry { | ||||||
|         if (npcIdLookupMap.containsKey(id)) throw new IllegalArgumentException("An npc with the id " + id + " already exists!"); |         if (npcIdLookupMap.containsKey(id)) throw new IllegalArgumentException("An npc with the id " + id + " already exists!"); | ||||||
|         NpcImpl npc = new NpcImpl(UUID.randomUUID(), configManager, textSerializer, world, type, location, packetFactory); |         NpcImpl npc = new NpcImpl(UUID.randomUUID(), configManager, textSerializer, world, type, location, packetFactory); | ||||||
|         NpcEntryImpl entry = new NpcEntryImpl(id, npc); |         NpcEntryImpl entry = new NpcEntryImpl(id, npc); | ||||||
|         npcIdLookupMap.put(id, entry); |         register(entry); | ||||||
|         return entry; |         return entry; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -144,7 +144,7 @@ public class NpcRegistryImpl implements NpcRegistry { | ||||||
|     public void delete(String id) { |     public void delete(String id) { | ||||||
|         id = id.toLowerCase(); |         id = id.toLowerCase(); | ||||||
|         if (!npcIdLookupMap.containsKey(id)) return; |         if (!npcIdLookupMap.containsKey(id)) return; | ||||||
|         npcIdLookupMap.remove(id).getNpc().delete(); |         unregister(npcIdLookupMap.get(id)); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void unload() { |     public void unload() { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue