Removed purge-related events (unused)

This commit is contained in:
Florian CUNY 2018-08-09 16:40:21 +02:00
parent 716495258c
commit 5ae88349b4
2 changed files with 0 additions and 107 deletions

View File

@ -1,22 +0,0 @@
package world.bentobox.bentobox.api.events.purge;
import world.bentobox.bentobox.api.events.IslandBaseEvent;
import world.bentobox.bentobox.database.objects.Island;
/**
* This event is fired before an island is going to be purged.
* Canceling this event will prevent the plugin to remove the island.
*
* @author Poslovitch
* @since 1.0
*/
public class PurgeDeleteIslandEvent extends IslandBaseEvent {
/**
* Called to create the event
* @param island - island that will be removed
*/
public PurgeDeleteIslandEvent(Island island) {
super(island);
}
}

View File

@ -1,85 +0,0 @@
package world.bentobox.bentobox.api.events.purge;
import java.util.List;
import java.util.UUID;
import org.bukkit.event.Cancellable;
import world.bentobox.bentobox.api.events.PremadeEvent;
/**
* This event is fired when islands to remove have been chosen and before starting to remove them.
* You can remove or add islands to remove.
* Canceling this event will cancel the purge
*
* @author Poslovitch
* @since 1.0
*/
public class PurgeStartEvent extends PremadeEvent implements Cancellable {
private boolean cancelled;
private final UUID user;
private List<UUID> islandsList;
/**
* Called to create the event
* @param user - the User - the UUID of the player who launched the purge, may be null if purge is launched using the console.
* @param islandsList - the list of islands to remove, based on their leader's UUID
*/
public PurgeStartEvent(UUID user, List<UUID> islandsList) {
this.user = user;
this.islandsList = islandsList;
}
/**
* @return the user who launched the purge, may be null if purge is launched using the console.
*/
public UUID getUser( ){
return user;
}
/**
* @return the list of islands to remove, based on their leader's UUID
*/
public List<UUID> getIslandsList() {
return islandsList;
}
/**
* Convenience method to directly add an island owner's UUID to the list
* @param islandOwner - the owner's UUID from the island to remove
*/
public void add(UUID islandOwner) {
if(!islandsList.contains(islandOwner)) {
islandsList.add(islandOwner);
}
}
/**
* Convenience method to directly remove an island owner's UUID to the list
* @param islandOwner - the owner's UUID from the island to remove
*/
public void remove(UUID islandOwner) {
if(islandsList.contains(islandOwner)) {
islandsList.remove(islandOwner);
}
}
/**
* Replace the island list
* @param islandsList - a new island owners' UUIDs list
*/
public void setIslandsList(List<UUID> islandsList) {
this.islandsList = islandsList;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
}