Merge branch 'main' into v5.4
This commit is contained in:
commit
e207eb5d0d
7 files changed
+12
-11
No files matched your search
@@ -11,9 +11,9 @@ jobs:
|
||||
pull-requests: write
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: dbelyaev/action-checkstyle@v0.8.4
|
||||
- uses: dbelyaev/action-checkstyle@v3
|
||||
continue-on-error: true
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -80,7 +80,7 @@ final class PlaceholderExpansionHook extends PlaceholderExpansion {
|
||||
return null;
|
||||
}
|
||||
|
||||
final var placeholder = paramsArray.removeFirst();
|
||||
final var placeholder = paramsArray.remove(0);
|
||||
|
||||
String worldName = parseWorldName(offlinePlayer, paramsArray);
|
||||
if (worldName == null) return null;
|
||||
@@ -103,9 +103,9 @@ final class PlaceholderExpansionHook extends PlaceholderExpansion {
|
||||
}
|
||||
|
||||
// Try get from params
|
||||
String paramWorldName = paramsArray.getLast();
|
||||
String paramWorldName = paramsArray.get(paramsArray.size() - 1);
|
||||
if (worldManager.isLoadedWorld(paramWorldName)) {
|
||||
paramsArray.removeLast();
|
||||
paramsArray.remove(paramsArray.size() - 1);
|
||||
return paramWorldName;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ final class PlaceholderExpansionHook extends PlaceholderExpansion {
|
||||
return String.valueOf(world.getSeed());
|
||||
}
|
||||
case "time" -> {
|
||||
String timeFormat = !placeholderParams.isEmpty() ? placeholderParams.getFirst() : "";
|
||||
String timeFormat = !placeholderParams.isEmpty() ? placeholderParams.get(0) : "";
|
||||
long time = world.getBukkitWorld().map(World::getTime).getOrElse(0L);
|
||||
switch (timeFormat) {
|
||||
case "" -> {
|
||||
|
||||
@@ -119,7 +119,7 @@ final class SpawnCommand extends CoreCommand {
|
||||
? Message.of(MVCorei18n.GENERIC_YOU)
|
||||
: Message.of(entity.getName())),
|
||||
Replace.WORLD.with(mvWorld.getName()),
|
||||
Replace.REASON.with(failure.getFirst().getFailureMessage())));
|
||||
Replace.REASON.with(failure.get(0).getFailureMessage())));
|
||||
}
|
||||
|
||||
private void handleMultiTeleport(MVCommandIssuer issuer, LoadedMultiverseWorld mvWorld,
|
||||
|
||||
@@ -202,7 +202,8 @@ final class CoreConfigNodes {
|
||||
final ConfigNode<PassengerModes> passengerMode = node(ConfigNode.builder("teleport.passenger-mode", PassengerModes.class)
|
||||
.comment("")
|
||||
.comment("Configures how passengers and vehicles are handled when an entity is teleported.")
|
||||
.comment(" default: Server will handle passengers and vehicles, this usually means entities will not be teleported to a different world if they have passengers.")
|
||||
.comment(" default: Server will handle passengers and vehicles. On papermc 1.21.10+, all will be retained by default.")
|
||||
.comment(" On older versions, all will be dismounted if world changes.")
|
||||
.comment(" dismount_passengers: Passengers will be removed from the parent entity before the teleport.")
|
||||
.comment(" dismount_vehicle: Vehicle will be removed and from the parent entity before the teleport.")
|
||||
.comment(" dismount_all: All passengers and vehicles will be removed from the parent entity before the teleport.")
|
||||
|
||||
@@ -249,7 +249,7 @@ final class MVPlayerListener implements CoreListener {
|
||||
.onSuccess(result -> Logging.fine("Player %s has been teleported on join",
|
||||
player.getName()))
|
||||
.onFailure(failure -> Logging.warning("Failed to teleport player %s on join: %s",
|
||||
player.getName(), failure.getFirst()));
|
||||
player.getName(), failure.get(0)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -241,8 +241,8 @@ final class WorldConfigNodes {
|
||||
if (!(world instanceof LoadedMultiverseWorld loadedWorld)) return;
|
||||
if (newValue == null || newValue instanceof NullSpawnLocation) return;
|
||||
loadedWorld.getBukkitWorld().peek(bukkitWorld -> {
|
||||
bukkitWorld.setSpawnLocation(newValue);
|
||||
newValue.setWorld(bukkitWorld);
|
||||
bukkitWorld.setSpawnLocation(newValue);
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public final class UnloadWorldOptions {
|
||||
* Sets whether to unload the bukkit world.
|
||||
* <br />
|
||||
* By setting this to false, multiverse will essentially untrack the world, but the world itself is still loaded.
|
||||
* This should be only used in edge cases where the world is used by other plugins byt you don't want multiverse
|
||||
* This should be only used in edge cases where the world is used by other plugins but you don't want multiverse
|
||||
* to handle it.
|
||||
*
|
||||
* @param unloadBukkitWorldInput Whether to unload the bukkit world.
|
||||
|
||||
Reference in new issue
Block a user