Inform players why they are teleported to spawn during an island restart.
This commit is contained in:
parent
46ac79503e
commit
be52a305fe
|
|
@ -167,6 +167,7 @@ public class MessageConfiguration implements Configuration {
|
||||||
public static class Restart {
|
public static class Restart {
|
||||||
String created = "Island restart request created type <yellow>/island restart confirm</yellow> or <yellow>/island restart deny</yellow>.<newline><red>This action can not be reversed!";
|
String created = "Island restart request created type <yellow>/island restart confirm</yellow> or <yellow>/island restart deny</yellow>.<newline><red>This action can not be reversed!";
|
||||||
String cancelled = "You have cancelled your island restart request!";
|
String cancelled = "You have cancelled your island restart request!";
|
||||||
|
String teleported = "You have been teleported to spawn because this island is restarting!";
|
||||||
}
|
}
|
||||||
|
|
||||||
private Leave leave = new Leave();
|
private Leave leave = new Leave();
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ public class RestartRequest extends Request {
|
||||||
Location spawnLocation = world.getSpawnLocation();
|
Location spawnLocation = world.getSpawnLocation();
|
||||||
for (Player target : islandWorld.getPlayers()) {
|
for (Player target : islandWorld.getPlayers()) {
|
||||||
target.teleport(spawnLocation);
|
target.teleport(spawnLocation);
|
||||||
|
target.sendRichMessage(requests().restart().teleported(), placeholders());
|
||||||
}
|
}
|
||||||
// TODO - run code to generate a new world and update the id for all members!
|
// TODO - run code to generate a new world and update the id for all members!
|
||||||
super.accept();
|
super.accept();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user