mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 14:43:49 +01:00
Adds missing locations to the event builder.
Some addons check the location and have NPE's if it is not set.
This commit is contained in:
parent
bf1b59076c
commit
472b9fa7b6
@ -74,6 +74,7 @@ public class AdminRegisterCommand extends ConfirmableCommand {
|
||||
user.sendMessage("general.success");
|
||||
IslandBaseEvent event = IslandEvent.builder()
|
||||
.island(i)
|
||||
.location(i.getCenter())
|
||||
.reason(IslandEvent.Reason.REGISTERED)
|
||||
.involvedPlayer(targetUUID)
|
||||
.admin(true)
|
||||
@ -92,6 +93,7 @@ public class AdminRegisterCommand extends ConfirmableCommand {
|
||||
user.sendMessage("general.success");
|
||||
IslandBaseEvent event = IslandEvent.builder()
|
||||
.island(i)
|
||||
.location(i.getCenter())
|
||||
.reason(IslandEvent.Reason.CREATED)
|
||||
.involvedPlayer(targetUUID)
|
||||
.admin(true)
|
||||
|
@ -54,6 +54,7 @@ public class AdminUnregisterCommand extends CompositeCommand {
|
||||
user.sendMessage("general.success");
|
||||
IslandBaseEvent event = IslandEvent.builder()
|
||||
.island(oldIsland)
|
||||
.location(oldIsland.getCenter())
|
||||
.reason(IslandEvent.Reason.UNREGISTERED)
|
||||
.involvedPlayer(targetUUID)
|
||||
.admin(true)
|
||||
|
Loading…
Reference in New Issue
Block a user