mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +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.CommandsManager;
|
||||||
import world.bentobox.bentobox.managers.FlagsManager;
|
import world.bentobox.bentobox.managers.FlagsManager;
|
||||||
import world.bentobox.bentobox.managers.HooksManager;
|
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.IslandWorldManager;
|
||||||
import world.bentobox.bentobox.managers.IslandsManager;
|
import world.bentobox.bentobox.managers.IslandsManager;
|
||||||
import world.bentobox.bentobox.managers.LocalesManager;
|
import world.bentobox.bentobox.managers.LocalesManager;
|
||||||
@ -68,7 +68,7 @@ public class BentoBox extends JavaPlugin {
|
|||||||
|
|
||||||
private boolean isLoaded;
|
private boolean isLoaded;
|
||||||
|
|
||||||
private IslandDeleteManager islandDeletionManager;
|
private IslandDeletionManager islandDeletionManager;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
@ -202,7 +202,7 @@ public class BentoBox extends JavaPlugin {
|
|||||||
// Death counter
|
// Death counter
|
||||||
manager.registerEvents(new DeathListener(this), this);
|
manager.registerEvents(new DeathListener(this), this);
|
||||||
// Island Delete Manager
|
// Island Delete Manager
|
||||||
islandDeletionManager = new IslandDeleteManager(this);
|
islandDeletionManager = new IslandDeletionManager(this);
|
||||||
manager.registerEvents(islandDeletionManager, this);
|
manager.registerEvents(islandDeletionManager, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ public class BentoBox extends JavaPlugin {
|
|||||||
/**
|
/**
|
||||||
* @return the islandDeletionManager
|
* @return the islandDeletionManager
|
||||||
*/
|
*/
|
||||||
public IslandDeleteManager getIslandDeletionManager() {
|
public IslandDeletionManager getIslandDeletionManager() {
|
||||||
return islandDeletionManager;
|
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.
|
* Listens for island deletions and adds them to the database. Removes them when the island is deleted.
|
||||||
* @author tastybento
|
* @author tastybento
|
||||||
*
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public class IslandDeleteManager implements Listener {
|
public class IslandDeletionManager implements Listener {
|
||||||
|
|
||||||
|
private BentoBox plugin;
|
||||||
/**
|
/**
|
||||||
* Queue of islands to delete
|
* Queue of islands to delete
|
||||||
*/
|
*/
|
||||||
private BentoBox plugin;
|
|
||||||
private Database<DeletedIslandDO> handler;
|
private Database<DeletedIslandDO> handler;
|
||||||
private Set<Location> inDeletion;
|
private Set<Location> inDeletion;
|
||||||
|
|
||||||
|
public IslandDeletionManager(BentoBox plugin) {
|
||||||
public IslandDeleteManager(BentoBox plugin) {
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
handler = new Database<>(plugin, DeletedIslandDO.class);
|
handler = new Database<>(plugin, DeletedIslandDO.class);
|
||||||
inDeletion = new HashSet<>();
|
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.api.user.User;
|
||||||
import world.bentobox.bentobox.database.objects.Island;
|
import world.bentobox.bentobox.database.objects.Island;
|
||||||
import world.bentobox.bentobox.managers.CommandsManager;
|
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.IslandWorldManager;
|
||||||
import world.bentobox.bentobox.managers.IslandsManager;
|
import world.bentobox.bentobox.managers.IslandsManager;
|
||||||
import world.bentobox.bentobox.managers.LocalesManager;
|
import world.bentobox.bentobox.managers.LocalesManager;
|
||||||
@ -51,7 +51,7 @@ public class AdminRegisterCommandTest {
|
|||||||
private IslandsManager im;
|
private IslandsManager im;
|
||||||
private PlayersManager pm;
|
private PlayersManager pm;
|
||||||
private UUID notUUID;
|
private UUID notUUID;
|
||||||
private IslandDeleteManager idm;
|
private IslandDeletionManager idm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws java.lang.Exception
|
* @throws java.lang.Exception
|
||||||
@ -115,7 +115,7 @@ public class AdminRegisterCommandTest {
|
|||||||
when(plugin.getLocalesManager()).thenReturn(lm);
|
when(plugin.getLocalesManager()).thenReturn(lm);
|
||||||
|
|
||||||
// Deletion Manager
|
// Deletion Manager
|
||||||
idm = mock(IslandDeleteManager.class);
|
idm = mock(IslandDeletionManager.class);
|
||||||
when(idm.inDeletion(Mockito.any())).thenReturn(false);
|
when(idm.inDeletion(Mockito.any())).thenReturn(false);
|
||||||
when(plugin.getIslandDeletionManager()).thenReturn(idm);
|
when(plugin.getIslandDeletionManager()).thenReturn(idm);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user