Skip to content

Commit e207eb5

Browse files
committed
Merge branch 'main' into v5.4
2 parents 147564c + 30e5086 commit e207eb5

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

.github/workflows/generic.checkstyle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
pull-requests: write
1212
continue-on-error: true
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
1515

16-
- uses: dbelyaev/action-checkstyle@v0.8.4
16+
- uses: dbelyaev/action-checkstyle@v3
1717
continue-on-error: true
1818
with:
1919
github_token: ${{ secrets.GITHUB_TOKEN }}

src/main/java/org/mvplugins/multiverse/core/PlaceholderExpansionHook.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public boolean persist() {
8080
return null;
8181
}
8282

83-
final var placeholder = paramsArray.removeFirst();
83+
final var placeholder = paramsArray.remove(0);
8484

8585
String worldName = parseWorldName(offlinePlayer, paramsArray);
8686
if (worldName == null) return null;
@@ -103,9 +103,9 @@ public boolean persist() {
103103
}
104104

105105
// Try get from params
106-
String paramWorldName = paramsArray.getLast();
106+
String paramWorldName = paramsArray.get(paramsArray.size() - 1);
107107
if (worldManager.isLoadedWorld(paramWorldName)) {
108-
paramsArray.removeLast();
108+
paramsArray.remove(paramsArray.size() - 1);
109109
return paramWorldName;
110110
}
111111

@@ -177,7 +177,7 @@ public boolean persist() {
177177
return String.valueOf(world.getSeed());
178178
}
179179
case "time" -> {
180-
String timeFormat = !placeholderParams.isEmpty() ? placeholderParams.getFirst() : "";
180+
String timeFormat = !placeholderParams.isEmpty() ? placeholderParams.get(0) : "";
181181
long time = world.getBukkitWorld().map(World::getTime).getOrElse(0L);
182182
switch (timeFormat) {
183183
case "" -> {

src/main/java/org/mvplugins/multiverse/core/commands/SpawnCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private void handleSingleTeleport(MVCommandIssuer issuer, LoadedMultiverseWorld
119119
? Message.of(MVCorei18n.GENERIC_YOU)
120120
: Message.of(entity.getName())),
121121
Replace.WORLD.with(mvWorld.getName()),
122-
Replace.REASON.with(failure.getFirst().getFailureMessage())));
122+
Replace.REASON.with(failure.get(0).getFailureMessage())));
123123
}
124124

125125
private void handleMultiTeleport(MVCommandIssuer issuer, LoadedMultiverseWorld mvWorld,

src/main/java/org/mvplugins/multiverse/core/config/CoreConfigNodes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ private <N extends Node> N node(N node) {
202202
final ConfigNode<PassengerModes> passengerMode = node(ConfigNode.builder("teleport.passenger-mode", PassengerModes.class)
203203
.comment("")
204204
.comment("Configures how passengers and vehicles are handled when an entity is teleported.")
205-
.comment(" default: Server will handle passengers and vehicles, this usually means entities will not be teleported to a different world if they have passengers.")
205+
.comment(" default: Server will handle passengers and vehicles. On papermc 1.21.10+, all will be retained by default.")
206+
.comment(" On older versions, all will be dismounted if world changes.")
206207
.comment(" dismount_passengers: Passengers will be removed from the parent entity before the teleport.")
207208
.comment(" dismount_vehicle: Vehicle will be removed and from the parent entity before the teleport.")
208209
.comment(" dismount_all: All passengers and vehicles will be removed from the parent entity before the teleport.")

src/main/java/org/mvplugins/multiverse/core/listeners/MVPlayerListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private void teleportToDestinationOnJoin(Player player, DestinationInstance<?, ?
249249
.onSuccess(result -> Logging.fine("Player %s has been teleported on join",
250250
player.getName()))
251251
.onFailure(failure -> Logging.warning("Failed to teleport player %s on join: %s",
252-
player.getName(), failure.getFirst()));
252+
player.getName(), failure.get(0)));
253253
}
254254

255255
/**

src/main/java/org/mvplugins/multiverse/core/world/WorldConfigNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ public Object serialize(Material object, Class<Material> type) {
241241
if (!(world instanceof LoadedMultiverseWorld loadedWorld)) return;
242242
if (newValue == null || newValue instanceof NullSpawnLocation) return;
243243
loadedWorld.getBukkitWorld().peek(bukkitWorld -> {
244-
bukkitWorld.setSpawnLocation(newValue);
245244
newValue.setWorld(bukkitWorld);
245+
bukkitWorld.setSpawnLocation(newValue);
246246
});
247247
}));
248248

src/main/java/org/mvplugins/multiverse/core/world/options/UnloadWorldOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public LoadedMultiverseWorld world() {
3838
* Sets whether to unload the bukkit world.
3939
* <br />
4040
* By setting this to false, multiverse will essentially untrack the world, but the world itself is still loaded.
41-
* This should be only used in edge cases where the world is used by other plugins byt you don't want multiverse
41+
* This should be only used in edge cases where the world is used by other plugins but you don't want multiverse
4242
* to handle it.
4343
*
4444
* @param unloadBukkitWorldInput Whether to unload the bukkit world.

0 commit comments

Comments
 (0)