Renamed IslandDeleteManager to IslandDeletionManager

This commit is contained in:
Florian CUNY 2019-01-13 10:09:35 +01:00
parent 7854187448
commit 0f253c35ef
3 changed files with 11 additions and 12 deletions

View File

@ -25,7 +25,7 @@ import world.bentobox.bentobox.managers.AddonsManager;
import world.bentobox.bentobox.managers.CommandsManager;
import world.bentobox.bentobox.managers.FlagsManager;
import world.bentobox.bentobox.managers.HooksManager;
import world.bentobox.bentobox.managers.IslandDeleteManager;
import world.bentobox.bentobox.managers.IslandDeletionManager;
import world.bentobox.bentobox.managers.IslandWorldManager;
import world.bentobox.bentobox.managers.IslandsManager;
import world.bentobox.bentobox.managers.LocalesManager;
@ -68,7 +68,7 @@ public class BentoBox extends JavaPlugin {
private boolean isLoaded;
private IslandDeleteManager islandDeletionManager;
private IslandDeletionManager islandDeletionManager;
@Override
public void onEnable(){
@ -202,7 +202,7 @@ public class BentoBox extends JavaPlugin {
// Death counter
manager.registerEvents(new DeathListener(this), this);
// Island Delete Manager
islandDeletionManager = new IslandDeleteManager(this);
islandDeletionManager = new IslandDeletionManager(this);
manager.registerEvents(islandDeletionManager, this);
}
@ -368,7 +368,7 @@ public class BentoBox extends JavaPlugin {
/**
* @return the islandDeletionManager
*/
public IslandDeleteManager getIslandDeletionManager() {
public IslandDeletionManager getIslandDeletionManager() {
return islandDeletionManager;
}
}

View File

@ -21,19 +21,18 @@ import world.bentobox.bentobox.util.Util;
/**
* Listens for island deletions and adds them to the database. Removes them when the island is deleted.
* @author tastybento
*
* @since 1.1
*/
public class IslandDeleteManager implements Listener {
public class IslandDeletionManager implements Listener {
private BentoBox plugin;
/**
* Queue of islands to delete
*/
private BentoBox plugin;
private Database<DeletedIslandDO> handler;
private Set<Location> inDeletion;
public IslandDeleteManager(BentoBox plugin) {
public IslandDeletionManager(BentoBox plugin) {
this.plugin = plugin;
handler = new Database<>(plugin, DeletedIslandDO.class);
inDeletion = new HashSet<>();

View File

@ -30,7 +30,7 @@ import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.managers.CommandsManager;
import world.bentobox.bentobox.managers.IslandDeleteManager;
import world.bentobox.bentobox.managers.IslandDeletionManager;
import world.bentobox.bentobox.managers.IslandWorldManager;
import world.bentobox.bentobox.managers.IslandsManager;
import world.bentobox.bentobox.managers.LocalesManager;
@ -51,7 +51,7 @@ public class AdminRegisterCommandTest {
private IslandsManager im;
private PlayersManager pm;
private UUID notUUID;
private IslandDeleteManager idm;
private IslandDeletionManager idm;
/**
* @throws java.lang.Exception
@ -115,7 +115,7 @@ public class AdminRegisterCommandTest {
when(plugin.getLocalesManager()).thenReturn(lm);
// Deletion Manager
idm = mock(IslandDeleteManager.class);
idm = mock(IslandDeletionManager.class);
when(idm.inDeletion(Mockito.any())).thenReturn(false);
when(plugin.getIslandDeletionManager()).thenReturn(idm);
}