Skip to content

Commit

Permalink
Release 1.11.2 (#101)
Browse files Browse the repository at this point in the history
* Version 1.11.2

* Renamed plugin Pladdon

* Update es.yml (#98)

* Build to BentoBox 1.18 API

* Fix plugin.yml

* Fix null player on removeWarp (#100)

Co-authored-by: KrazyxWolf <[email protected]>
Co-authored-by: Huynh Tien <[email protected]>
  • Loading branch information
3 people authored Dec 31, 2021
1 parent 70457af commit d93f060
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 26 deletions.
32 changes: 29 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.17.0</bentobox.version>
<bentobox.version>1.18.0-SNAPSHOT</bentobox.version>
<level.version>2.7.0-SNAPSHOT</level.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.11.1</build.version>
<build.version>1.11.2</build.version>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Warps</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down Expand Up @@ -229,7 +229,33 @@
<version>3.0.0-M5</version>
<configuration>
<argLine>
--illegal-access=permit
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.math=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens
java.base/java.util.stream=ALL-UNNAMED
--add-opens java.base/java.text=ALL-UNNAMED
--add-opens
java.base/java.util.regex=ALL-UNNAMED
--add-opens
java.base/java.nio.channels.spi=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens
java.base/java.util.concurrent=ALL-UNNAMED
--add-opens java.base/sun.nio.fs=ALL-UNNAMED
--add-opens java.base/sun.nio.cs=ALL-UNNAMED
--add-opens java.base/java.nio.file=ALL-UNNAMED
--add-opens
java.base/java.nio.charset=ALL-UNNAMED
--add-opens
java.base/java.lang.reflect=ALL-UNNAMED
--add-opens
java.logging/java.util.logging=ALL-UNNAMED
--add-opens java.base/java.lang.ref=ALL-UNNAMED
--add-opens java.base/java.util.jar=ALL-UNNAMED
--add-opens java.base/java.util.zip=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/world/bentobox/warps/WarpSignsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.permissions.PermissionAttachmentInfo;
import org.eclipse.jdt.annotation.NonNull;
Expand Down Expand Up @@ -241,11 +242,9 @@ public void removeWarp(Location loc) {
Entry<UUID, Location> en = it.next();
if (en.getValue().equals(loc)) {
// Inform player
User user = User.getInstance(addon.getServer().getPlayer(en.getKey()));
if (user != null) {
// Inform the player
user.sendMessage("warps.sign-removed");
}
Optional.ofNullable(addon.getServer().getPlayer(en.getKey()))
.map(User::getInstance)
.ifPresent(user -> user.sendMessage("warps.sign-removed"));
// Remove sign from warp panel cache
addon.getWarpPanelManager().removeWarp(loc.getWorld(), en.getKey());
it.remove();
Expand Down
33 changes: 17 additions & 16 deletions src/main/resources/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,26 @@
warp:
help:
description: "Teletransportarte hacia el warp del jugador"
parameters: <name>
parameters: <player name>
warps:
deactivate: "&cViejo cartel a sido desactivado!"
deactivate: "&c¡El cartel viejo ha sido desactivado!"
error:
does-not-exist: "&cOh snap! Ese warp ya no existe!"
no-permission: "&CNo tienes permiso para hacer eso!"
no-remove: "&CNo puedes quitar ese cartel!"
no-warps-yet: "&CNo hay warps disponibles aun"
not-enough-level: "&CTu nivel de isla no es lo suficientemente alto!"
not-on-island: "&CDebes estar en tu isla para hacer eso!"
not-safe: "&cEse warp no es seguro!"
does-not-exist: "&c¡Oh vaya! !Ese warp ya no existe!"
no-permission: "&c¡No tienes permiso para hacer eso!"
no-remove: "&c¡No puedes quitar ese cartel!"
no-warps-yet: "&cNo hay warps disponibles aún"
not-enough-level: "&c¡Tu nivel de isla no es lo suficientemente alto!"
not-on-island: "&c¡Debes estar en tu isla para hacer eso!"
not-safe: "&c¡Ese warp no es seguro!"
your-level-is: "&cTu nivel de isla es solo [level] y debe ser mayor que [required]"
help:
description: "Abre el panel de warps"
next: "&6Siguiente página"
player-warped: "&2[name] teletransportarte a tu warp!"
previous: "&6Pagina anterior"
sign-removed: "&CCartel removido!"
success: "&AExito!"
title: "Carteles de Warps"
warpTip: "&6Coloca un cartel con este texto [text] arriba"
warpToPlayersSign: "&6Teletransportandote al warp de [player]"
player-warped: "&2[name] ¡se ha teletransportado a tu warp!"
previous: "&6Página anterior"
random: "&4Teletransporte aleatorio"
sign-removed: "&c¡Cartel removido!"
success: "&a¡Éxito!"
title: "Carteles de Warps"
warpTip: "&6Coloca un cartel que contenga el texto [text] arriba"
warpToPlayersSign: "&6Teletransportandote al warp de [player]"
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Warps
name: Pladdon
main: world.bentobox.warps.WarpsPladdon
version: ${version}
api-version: 1.17
api-version: 1.16
description: A Warp Pladdon for BentoBox
author: tastybento
depend:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public void setUp() throws Exception {
PowerMockito.mockStatic(Util.class);
when(Util.getWorld(any())).thenAnswer((Answer<World>) invocation -> invocation.getArgument(0, World.class));
when(Util.sameWorld(any(), any())).thenReturn(true);
when(Util.translateColorCodes(any())).thenAnswer((Answer<String>) invocation -> invocation.getArgument(0, String.class));

// Location
when(location.getWorld()).thenReturn(world);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public void setUp() {
PowerMockito.mockStatic(Util.class);
when(Util.getWorld(any())).thenReturn(world);
when(Util.stripSpaceAfterColorCodes(anyString())).thenAnswer(invocation -> invocation.getArgument(0, String.class));
when(Util.translateColorCodes(any())).thenAnswer((Answer<String>) invocation -> invocation.getArgument(0, String.class));

// Locales
when(lm.get(any(User.class), anyString())).thenAnswer(answer);
Expand Down

0 comments on commit d93f060

Please sign in to comment.