Skip to content

Commit 0ee9ff4

Browse files
authored
Merge pull request #2118 from BentoBoxWorld/develop
Version 1.23.0
2 parents fe888a8 + 84e6523 commit 0ee9ff4

File tree

216 files changed

+1302
-891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+1302
-891
lines changed

pom.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@
7373
<postgresql.version>42.2.18</postgresql.version>
7474
<hikaricp.version>5.0.1</hikaricp.version>
7575
<!-- More visible way to change dependency versions -->
76-
<spigot.version>1.19.3-R0.1-SNAPSHOT</spigot.version>
76+
<spigot.version>1.19.4-R0.1-SNAPSHOT</spigot.version>
7777
<!-- Might differ from the last Spigot release for short periods
7878
of time -->
79-
<paper.version>1.19-R0.1-SNAPSHOT</paper.version>
79+
<paper.version>1.19.3-R0.1-SNAPSHOT</paper.version>
8080
<bstats.version>3.0.0</bstats.version>
8181
<vault.version>1.7.1</vault.version>
8282
<placeholderapi.version>2.10.9</placeholderapi.version>
@@ -88,9 +88,10 @@
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.22.0</build.version>
91+
<build.version>1.23.0</build.version>
9292
<sonar.organization>bentobox-world</sonar.organization>
9393
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
94+
<server.jars>${project.basedir}/lib</server.jars>
9495
</properties>
9596

9697
<!-- Profiles will allow to automatically change build version. -->
@@ -312,7 +313,7 @@
312313
<version>3.2.2</version>
313314
<scope>provided</scope>
314315
</dependency>
315-
<!-- Spigot NMS. Used for chunk deletion and pasting. -->
316+
<!-- Spigot NMS. Used for chunk deletion and pasting.-->
316317
<dependency>
317318
<groupId>org.spigotmc</groupId>
318319
<artifactId>spigot</artifactId>

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public Optional<CompositeCommand> getAdminCommand() {
117117
/**
118118
* Defines the world generator for this game mode
119119
* @param worldName - name of world that this applies to
120-
* @param id - id if any
120+
* @param id - id if any. "delete" is used when this request is for island deletion purposes
121121
* @return Chunk generator or null if one does not exist, e.g. the use own generator setting is true
122122
* @since 1.2.0
123123
*/
@@ -130,5 +130,14 @@ public Optional<CompositeCommand> getAdminCommand() {
130130
* @since 1.4.0
131131
*/
132132
public abstract void saveWorldSettings();
133+
134+
/**
135+
* Defines if the game mode uses the latest {@link ChunkGenerator} API or
136+
* deprecated {@link ChunkGenerator#generateChunkData(World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)} approach.
137+
* @return true if this game mode is a void world and should just be deleted as such
138+
*/
139+
public boolean isUsesNewChunkGeneration() {
140+
return false;
141+
}
133142

134143
}

src/main/java/world/bentobox/bentobox/api/addons/request/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* <p>
44
* Addons can expose data that they want to expose. To access it, call this class with the appropriate addon name,
55
* the label for the data that is requested and if required, a map of key-value pairs that will be given to the addon.
6-
*
6+
* <p>
77
* <b>Note</b> Since BentoBox 1.17.0, Addons can be declared as Pladdons and be loaded by the Bukkit classloader. This
88
* enables Plugins to access Addon methods directly so this API is not required.
99
* </p>

src/main/java/world/bentobox/bentobox/api/commands/admin/blueprints/AdminBlueprintCommand.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ private void paintAxis(User user, BlueprintClipboard clipboard) {
121121
user.spawnParticle(PARTICLE, PARTICLE_DUST_OPTIONS, maxX + 0.5, maxY + 0.5, z + 0.5);
122122
}
123123

124-
// Drawing origin
125-
if (clipboard.getOrigin() != null) {
126-
user.spawnParticle(Particle.VILLAGER_HAPPY, null, clipboard.getOrigin().getBlockX() + 0.5, clipboard.getOrigin().getBlockY() + 0.5, clipboard.getOrigin().getBlockZ() + 0.5);
127-
}
128-
129124
}
130125

131126
protected void hideClipboard(User user) {

src/main/java/world/bentobox/bentobox/api/commands/island/IslandBanCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ private boolean ban(@NonNull User issuer, User target) {
112112
}
113113
// Event is not cancelled
114114
if (island.ban(issuer.getUniqueId(), target.getUniqueId())) {
115-
issuer.sendMessage("commands.island.ban.player-banned", TextVariables.NAME, target.getName());
116-
target.sendMessage("commands.island.ban.owner-banned-you", TextVariables.NAME, issuer.getName());
115+
issuer.sendMessage("commands.island.ban.player-banned", TextVariables.NAME, target.getName(), TextVariables.DISPLAY_NAME, target.getDisplayName());
116+
target.sendMessage("commands.island.ban.owner-banned-you", TextVariables.NAME, issuer.getName(), TextVariables.DISPLAY_NAME, issuer.getDisplayName());
117117
// If the player is online, has an island and on the banned island, move them home immediately
118118
if (target.isOnline() && getIslands().hasIsland(getWorld(), target.getUniqueId()) && island.onIsland(target.getLocation())) {
119119
getIslands().homeTeleportAsync(getWorld(), target.getPlayer());

src/main/java/world/bentobox/bentobox/api/commands/island/IslandExpelCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,17 @@ public boolean execute(User user, String label, List<String> args) {
116116
return false;
117117
}
118118

119-
target.sendMessage("commands.island.expel.player-expelled-you", TextVariables.NAME, user.getName());
119+
target.sendMessage("commands.island.expel.player-expelled-you", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
120120
island.getWorld().playSound(target.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 1F, 1F);
121121
if (getIslands().hasIsland(getWorld(), target) || getIslands().inTeam(getWorld(), target.getUniqueId())) {
122122
// Success
123-
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName());
123+
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName(), TextVariables.DISPLAY_NAME, target.getDisplayName());
124124
// Teleport home
125125
getIslands().homeTeleportAsync(getWorld(), target.getPlayer());
126126
return true;
127127
} else if (getIslands().getSpawn(getWorld()).isPresent()){
128128
// Success
129-
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName());
129+
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName(), TextVariables.DISPLAY_NAME, target.getDisplayName());
130130
getIslands().spawnTeleport(getWorld(), target.getPlayer());
131131
return true;
132132
} else if (getIWM().getAddon(getWorld())
@@ -136,7 +136,7 @@ public boolean execute(User user, String label, List<String> args) {
136136
.orElse(false)
137137
&& target.performCommand(this.getTopLabel() + " create")) {
138138
getAddon().logWarning("Expel: " + target.getName() + " had no island, so one was created");
139-
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName());
139+
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName(), TextVariables.DISPLAY_NAME, target.getDisplayName());
140140
return true;
141141
}
142142

src/main/java/world/bentobox/bentobox/api/commands/island/IslandUnbanCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public boolean execute(User user, String label, List<String> args) {
9494
}
9595
// Event is not cancelled
9696
if (island.unban(user.getUniqueId(), target.getUniqueId())) {
97-
user.sendMessage("commands.island.unban.player-unbanned", TextVariables.NAME, target.getName());
98-
target.sendMessage("commands.island.unban.you-are-unbanned", TextVariables.NAME, user.getName());
97+
user.sendMessage("commands.island.unban.player-unbanned", TextVariables.NAME, target.getName(), TextVariables.DISPLAY_NAME, target.getDisplayName());
98+
target.sendMessage("commands.island.unban.you-are-unbanned", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
9999
// Set cooldown
100100
if (getSettings().getBanCooldown() > 0 && getParent() != null) {
101101
getParent().getSubCommand("ban").ifPresent(subCommand ->

src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamCoopCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ public boolean execute(User user, String label, List<String> args) {
105105
}
106106

107107
island.setRank(target, RanksManager.COOP_RANK);
108-
user.sendMessage("commands.island.team.coop.success", TextVariables.NAME, target.getName());
109-
target.sendMessage("commands.island.team.coop.you-are-a-coop-member", TextVariables.NAME, user.getName());
108+
user.sendMessage("commands.island.team.coop.success", TextVariables.NAME, target.getName(), TextVariables.DISPLAY_NAME, target.getDisplayName());
109+
target.sendMessage("commands.island.team.coop.you-are-a-coop-member", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
110110
}
111111
return true;
112112
} else {

src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteAcceptCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ private void acceptTrustInvite(User user, Invite invite) {
111111
.rankChange(island.getRank(user), RanksManager.TRUSTED_RANK)
112112
.build();
113113
if (inviter.isOnline()) {
114-
inviter.sendMessage("commands.island.team.trust.success", TextVariables.NAME, user.getName());
114+
inviter.sendMessage("commands.island.team.trust.success", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
115115
}
116116
if (inviter.isPlayer()) {
117-
user.sendMessage("commands.island.team.trust.you-are-trusted", TextVariables.NAME, inviter.getName());
117+
user.sendMessage("commands.island.team.trust.you-are-trusted", TextVariables.NAME, inviter.getName(), TextVariables.DISPLAY_NAME, inviter.getDisplayName());
118118
}
119119
}
120120
}
@@ -138,10 +138,10 @@ private void acceptCoopInvite(User user, Invite invite) {
138138
.rankChange(island.getRank(user), RanksManager.COOP_RANK)
139139
.build();
140140
if (inviter.isOnline()) {
141-
inviter.sendMessage("commands.island.team.coop.success", TextVariables.NAME, user.getName());
141+
inviter.sendMessage("commands.island.team.coop.success", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
142142
}
143143
if (inviter.isPlayer()) {
144-
user.sendMessage("commands.island.team.coop.you-are-a-coop-member", TextVariables.NAME, inviter.getName());
144+
user.sendMessage("commands.island.team.coop.you-are-a-coop-member", TextVariables.NAME, inviter.getName(), TextVariables.DISPLAY_NAME, inviter.getDisplayName());
145145
}
146146
}
147147
}
@@ -188,7 +188,7 @@ private void acceptTeamInvite(User user, Invite invite) {
188188
user.sendMessage("commands.island.team.invite.accept.you-joined-island", TextVariables.LABEL, getTopLabel());
189189
User inviter = User.getInstance(invite.getInviter());
190190
if (inviter.isOnline()) {
191-
inviter.sendMessage("commands.island.team.invite.accept.name-joined-your-island", TextVariables.NAME, user.getName());
191+
inviter.sendMessage("commands.island.team.invite.accept.name-joined-your-island", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
192192
}
193193
getIslands().save(teamIsland);
194194
// Fire event

src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamInviteCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ public boolean execute(User user, String label, List<String> args) {
129129
// Put the invited player (key) onto the list with inviter (value)
130130
// If someone else has invited a player, then this invite will overwrite the previous invite!
131131
itc.addInvite(Invite.Type.TEAM, user.getUniqueId(), invitedPlayer.getUniqueId());
132-
user.sendMessage("commands.island.team.invite.invitation-sent", TextVariables.NAME, invitedPlayer.getName());
132+
user.sendMessage("commands.island.team.invite.invitation-sent", TextVariables.NAME, invitedPlayer.getName(), TextVariables.DISPLAY_NAME, invitedPlayer.getDisplayName());
133133
// Send message to online player
134-
invitedPlayer.sendMessage("commands.island.team.invite.name-has-invited-you", TextVariables.NAME, user.getName());
134+
invitedPlayer.sendMessage("commands.island.team.invite.name-has-invited-you", TextVariables.NAME, user.getName(), TextVariables.DISPLAY_NAME, user.getDisplayName());
135135
invitedPlayer.sendMessage("commands.island.team.invite.to-accept-or-reject", TextVariables.LABEL, getTopLabel());
136136
if (getIslands().hasIsland(getWorld(), invitedPlayer.getUniqueId())) {
137137
invitedPlayer.sendMessage("commands.island.team.invite.you-will-lose-your-island");

0 commit comments

Comments
 (0)