mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 20:55:41 +01:00
Make events public so they can be instantiated in 3rd party JUnit tests
I need to create "fake" events to test addons but unless they are public I cannot. All Bukkit events are public, so this should be fine.
This commit is contained in:
parent
a713b7be07
commit
7d0eb3586d
@ -23,7 +23,7 @@ public abstract class IslandBaseEvent extends BentoBoxEvent implements Cancellab
|
||||
protected final Event rawEvent;
|
||||
protected IslandBaseEvent newEvent;
|
||||
|
||||
protected IslandBaseEvent(Island island) {
|
||||
public IslandBaseEvent(Island island) {
|
||||
super();
|
||||
this.island = island;
|
||||
playerUUID = island == null ? null : island.getOwner();
|
||||
@ -38,7 +38,7 @@ public abstract class IslandBaseEvent extends BentoBoxEvent implements Cancellab
|
||||
* @param admin - true if ths is due to an admin event
|
||||
* @param location - the location
|
||||
*/
|
||||
protected IslandBaseEvent(Island island, UUID playerUUID, boolean admin, Location location) {
|
||||
public IslandBaseEvent(Island island, UUID playerUUID, boolean admin, Location location) {
|
||||
super();
|
||||
this.island = island;
|
||||
this.playerUUID = playerUUID;
|
||||
@ -54,7 +54,7 @@ public abstract class IslandBaseEvent extends BentoBoxEvent implements Cancellab
|
||||
* @param location - the location
|
||||
* @param rawEvent - the raw event
|
||||
*/
|
||||
protected IslandBaseEvent(Island island, UUID playerUUID, boolean admin, Location location, Event rawEvent) {
|
||||
public IslandBaseEvent(Island island, UUID playerUUID, boolean admin, Location location, Event rawEvent) {
|
||||
super();
|
||||
this.island = island;
|
||||
this.playerUUID = playerUUID;
|
||||
|
@ -28,7 +28,7 @@ public class IslandBanEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandBanEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandBanEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class IslandCreateEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandCreateEvent(Island island, UUID player, boolean admin, Location location, @NonNull BlueprintBundle blueprintBundle) {
|
||||
public IslandCreateEvent(Island island, UUID player, boolean admin, Location location, @NonNull BlueprintBundle blueprintBundle) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
this.blueprintBundle = blueprintBundle;
|
||||
|
@ -25,7 +25,7 @@ public class IslandCreatedEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandCreatedEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandCreatedEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class IslandDeleteChunksEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandDeleteChunksEvent(Island island, UUID player, boolean admin, Location location, IslandDeletion deletedIsland) {
|
||||
public IslandDeleteChunksEvent(Island island, UUID player, boolean admin, Location location, IslandDeletion deletedIsland) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
this.deletedIslandInfo = deletedIsland;
|
||||
|
@ -26,7 +26,7 @@ public class IslandDeleteEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandDeleteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandDeleteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class IslandDeletedEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandDeletedEvent(Island island, UUID player, boolean admin, Location location, IslandDeletion deletedIsland) {
|
||||
public IslandDeletedEvent(Island island, UUID player, boolean admin, Location location, IslandDeletion deletedIsland) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
this.deletedIslandInfo = deletedIsland;
|
||||
|
@ -29,7 +29,7 @@ public class IslandEnterEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandEnterEvent(Island island, UUID player, boolean admin, Location location, @Nullable Island fromIsland, Event rawEvent) {
|
||||
public IslandEnterEvent(Island island, UUID player, boolean admin, Location location, @Nullable Island fromIsland, Event rawEvent) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location, rawEvent);
|
||||
this.fromIsland = fromIsland;
|
||||
|
@ -29,7 +29,7 @@ public class IslandExitEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandExitEvent(Island island, UUID player, boolean admin, Location location, @Nullable Island toIsland, Event rawEvent) {
|
||||
public IslandExitEvent(Island island, UUID player, boolean admin, Location location, @Nullable Island toIsland, Event rawEvent) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location, rawEvent);
|
||||
this.toIsland = toIsland;
|
||||
|
@ -29,7 +29,7 @@ public class IslandExpelEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandExpelEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandExpelEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class IslandGeneralEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandGeneralEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandGeneralEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class IslandLockEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandLockEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandLockEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class IslandNewIslandEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandNewIslandEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandNewIslandEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public class IslandPreCreateEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandPreCreateEvent(UUID player) {
|
||||
public IslandPreCreateEvent(UUID player) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(null, player, false, null);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class IslandPreclearEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandPreclearEvent(Island island, UUID player, boolean admin, Location location, @NonNull Island oldIsland) {
|
||||
public IslandPreclearEvent(Island island, UUID player, boolean admin, Location location, @NonNull Island oldIsland) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
// Create a copy of the old island
|
||||
|
@ -46,7 +46,7 @@ public class IslandProtectionRangeChangeEvent extends IslandBaseEvent {
|
||||
* @param newRange of type int
|
||||
* @param oldRange of type int
|
||||
*/
|
||||
IslandProtectionRangeChangeEvent(Island island, UUID player, boolean admin, Location location, int newRange, int oldRange) {
|
||||
public IslandProtectionRangeChangeEvent(Island island, UUID player, boolean admin, Location location, int newRange, int oldRange) {
|
||||
super(island, player, admin, location);
|
||||
this.newRange = newRange;
|
||||
this.oldRange = oldRange;
|
||||
|
@ -26,7 +26,7 @@ public class IslandRegisteredEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandRegisteredEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandRegisteredEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
}
|
@ -26,7 +26,7 @@ public class IslandReservedEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandReservedEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandReservedEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@ public class IslandResetEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandResetEvent(Island island, UUID player, boolean admin, Location location, @NonNull BlueprintBundle blueprintBundle, @NonNull Island oldIsland) {
|
||||
public IslandResetEvent(Island island, UUID player, boolean admin, Location location, @NonNull BlueprintBundle blueprintBundle, @NonNull Island oldIsland) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
this.blueprintBundle = blueprintBundle;
|
||||
|
@ -27,7 +27,7 @@ public class IslandResettedEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandResettedEvent(Island island, UUID player, boolean admin, Location location, Island oldIsland) {
|
||||
public IslandResettedEvent(Island island, UUID player, boolean admin, Location location, Island oldIsland) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
// Create a copy of the old island
|
||||
|
@ -26,7 +26,7 @@ public class IslandUnlockEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandUnlockEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandUnlockEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class IslandUnregisteredEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
IslandUnregisteredEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public IslandUnregisteredEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ public class TeamDeleteEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamDeleteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamDeleteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamGeneralEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamGeneralEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamGeneralEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamInfoEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamInfoEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamInfoEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamInviteEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamInviteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamInviteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamJoinEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamJoinEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamJoinEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class TeamJoinedEvent extends IslandBaseEvent {
|
||||
* @param location - location
|
||||
* @since 1.3.0
|
||||
*/
|
||||
TeamJoinedEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamJoinedEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamKickEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamKickEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamKickEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class TeamLeaveEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamLeaveEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamLeaveEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamRejectEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamRejectEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamRejectEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class TeamSetownerEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamSetownerEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamSetownerEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class TeamUninviteEvent extends IslandBaseEvent {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
TeamUninviteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
public TeamUninviteEvent(Island island, UUID player, boolean admin, Location location) {
|
||||
// Final variables have to be declared in the constructor
|
||||
super(island, player, admin, location);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user