Skip to content

Commit fbe4a3b

Browse files
committed
Fix Paper method use
from dev branch of 89apt89
1 parent c16531a commit fbe4a3b

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
- name: Upload RandomSpawnPlus5
2121
uses: actions/upload-artifact@v3
2222
with:
23-
name: RandomSpawnPlus5-maven
23+
name: RandomSpawnPlus5
2424
path: target/

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ $RECYCLE.BIN/
100100
# Windows shortcuts
101101
*.lnk
102102

103-
.gradle
104-
build/
103+
target/
105104

106105
# Ignore Gradle GUI config
107106
gradle-app.setting

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>systems.kscott</groupId>
88
<artifactId>randomspawnplus</artifactId>
9-
<version>5.0.0</version>
9+
<version>5.0.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>RandomSpawnPlus</name>

src/main/java/systems/kscott/randomspawnplus/listeners/RSPFirstJoinListener.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void firstJoinHandler(PlayerJoinEvent event) {
4141
} else {
4242
try {
4343
Location spawnLoc = SpawnFinder.getInstance().findSpawn(true);
44-
//by quiquelhappy - Prevent essentials home replace
44+
// quiquelhappy start - Prevent essentials home replace
4545
boolean prevent = false;
4646
if (config.getBoolean("essentials-home-on-first-spawn")) {
4747
User user = plugin.getEssentials().getUser(player);
@@ -66,6 +66,7 @@ public void run() {
6666
} else {
6767
plugin.getLogger().warning("The spawn finder prevented a teleport for " + player.getUniqueId() + ", since essentials sethome is enabled and the player already had a home (perhaps old player data?).");
6868
}
69+
// quiquelhappy end
6970
} catch (FinderTimedOutException e) {
7071
plugin.getLogger().warning("The spawn finder failed to find a valid spawn, and has not given " + player.getUniqueId() + " a random spawn. If you find this happening a lot, then raise the 'spawn-finder-tries-before-timeout' key in the config.");
7172
return;

src/main/java/systems/kscott/randomspawnplus/spawn/SpawnFinder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ public boolean checkSpawn(Location location) {
167167
if (locClone == null) {
168168
return false;
169169
}
170-
if (!location.isChunkLoaded()) {
170+
// 89apt89 start - Fix Paper method use
171+
if (!location.getChunk().isLoaded()) {
171172
location.getChunk().load();
172173
}
174+
// 89apt89 end
173175

174176
Block block0 = locClone.getBlock();
175177
Block block1 = locClone.add(0, 1, 0).getBlock();

src/main/resources/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#############################
22
# RandomSpawnPlus5 #
3+
# Version 5.0.1 #
34
# by @89apt89 & @Dreeam #
45
#############################
56

src/main/resources/lang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#############################
22
# RandomSpawnPlus5 #
3-
# Version 5.0.0 #
3+
# Version 5.0.1 #
44
# by @89apt89 & @Dreeam #
55
#############################
66

0 commit comments

Comments
 (0)