mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 11:45:31 +01:00
Renamed IslandDeleteManager to IslandDeletionManager
This commit is contained in:
parent
7854187448
commit
0f253c35ef
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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<>();
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user