Skip to content

Commit fdc03df

Browse files
authored
Merge pull request #2129 from BentoBoxWorld/develop
Version 1.23.2
2 parents ce5830e + eb76d00 commit fdc03df

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<!-- Do not change unless you want different name for local builds. -->
8989
<build.number>-LOCAL</build.number>
9090
<!-- This allows to change between versions. -->
91-
<build.version>1.23.1</build.version>
91+
<build.version>1.23.2</build.version>
9292
<sonar.organization>bentobox-world</sonar.organization>
9393
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
9494
<server.jars>${project.basedir}/lib</server.jars>

src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
public abstract class Pladdon extends JavaPlugin {
1717

18-
private static final String ADDONS_FOLDER = "BentoBox/addons";
18+
private static final String ADDONS_FOLDER = "BentoBox" + File.separator + "addons";
1919

2020
/**
2121
* This must return a new instance of the addon. It is called when the Pladdon is loaded.
@@ -33,7 +33,7 @@ public void onLoad() {
3333
}
3434

3535
protected void moveJar() {
36-
getLogger().severe(getFile().getName() + " must be in the BentoBox/addons folder! Trying to move it there...");
36+
getLogger().severe(getFile().getName() + " must be in the " + ADDONS_FOLDER + " folder! Trying to move it there...");
3737
File addons = new File(getFile().getParent(), ADDONS_FOLDER);
3838
if (addons.exists() || addons.mkdirs()) {
3939
File to = new File(addons, getFile().getName());
@@ -44,7 +44,7 @@ protected void moveJar() {
4444

4545
} catch (IOException ex) {
4646
getLogger().severe("Failed to move it. " + ex.getMessage());
47-
getLogger().severe("Move " + getFile().getName() + " manually into the BentoBox/addons folder. Then restart server.");
47+
getLogger().severe("Move " + getFile().getName() + " manually into the " + ADDONS_FOLDER + " folder. Then restart server.");
4848
}
4949
} else {
5050
getLogger().warning(getFile().getName() + " already is in the addons folder. Delete the one in the plugins folder.");

src/main/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListener.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
import world.bentobox.bentobox.api.user.User;
1212
import world.bentobox.bentobox.database.objects.Island;
1313
import world.bentobox.bentobox.lists.Flags;
14+
import world.bentobox.bentobox.managers.RanksManager;
1415
import world.bentobox.bentobox.util.Util;
1516

1617
/**
1718
* Prevents visitors from losing their items if they
1819
* die on an island in which they are a visitor.
20+
* Coops and above are not considered visitors.
1921
* Handles {@link world.bentobox.bentobox.lists.Flags#VISITOR_KEEP_INVENTORY}.
2022
* @author jstnf
2123
* @since 1.17.0
@@ -32,7 +34,7 @@ public void onVisitorDeath(PlayerDeathEvent e) {
3234
}
3335

3436
Optional<Island> island = getIslands().getProtectedIslandAt(e.getEntity().getLocation());
35-
if (island.isPresent() && !island.get().getMemberSet().contains(e.getEntity().getUniqueId())) {
37+
if (island.isPresent() && !island.get().getMemberSet(RanksManager.COOP_RANK).contains(e.getEntity().getUniqueId())) {
3638
e.setKeepInventory(true);
3739
e.setKeepLevel(true);
3840
e.getDrops().clear();

src/main/resources/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ general:
5959
# This helps prevent issues if the server crashes.
6060
# Data is also saved at important points in the game.
6161
backup-period: 5
62-
# How many players will be saved in one tick. Default is 200
62+
# How many players will be saved in one tick. Default is 20
6363
# Reduce if you experience lag while saving.
6464
# Do not set this too low or data might get lost!
6565
max-saved-players-per-tick: 20
66-
# How many islands will be saved in one tick. Default is 200
66+
# How many islands will be saved in one tick. Default is 20
6767
# Reduce if you experience lag while saving.
6868
# Do not set this too low or data might get lost!
6969
max-saved-islands-per-tick: 20

src/main/resources/locales/en-US.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ commands:
7474
remove:
7575
description: "reduces the player's island reset count"
7676
parameters: "<player> <resets>"
77-
success: "&a Successfully removed &b [number] &a resets from &b [name]'s island, decreasing the total to &b [total]&a resets."
77+
success: "&a Successfully removed &b [number] &a resets from &b [name]'s island&a, decreasing the total to &b[total]&a resets."
7878
purge:
7979
parameters: "[days]"
8080
description: "purge islands abandoned for more than [days]"

src/test/java/world/bentobox/bentobox/listeners/PanelListenerManagerTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,17 @@ public String getTitle() {
171171
return name;
172172
}
173173

174+
@Override
175+
public String getOriginalTitle() {
176+
// TODO Auto-generated method stub
177+
return "";
178+
}
179+
180+
@Override
181+
public void setTitle(String title) {
182+
// TODO Auto-generated method stub
183+
}
184+
174185
}
175186

176187
@After

src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListenerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static org.junit.Assert.assertFalse;
55
import static org.junit.Assert.assertTrue;
66
import static org.mockito.ArgumentMatchers.any;
7+
import static org.mockito.ArgumentMatchers.anyInt;
78
import static org.mockito.ArgumentMatchers.anyString;
89
import static org.mockito.ArgumentMatchers.eq;
910
import static org.mockito.Mockito.mock;
@@ -122,7 +123,7 @@ public void setUp() throws Exception {
122123
/* Islands */
123124
when(plugin.getIslands()).thenReturn(islandsManager);
124125
// Visitor
125-
when(island.getMemberSet()).thenReturn(ImmutableSet.of());
126+
when(island.getMemberSet(anyInt())).thenReturn(ImmutableSet.of());
126127
// By default, there should be an island.
127128
when(islandsManager.getProtectedIslandAt(any())).thenReturn(Optional.of(island));
128129

0 commit comments

Comments
 (0)