mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-29 14:15:23 +01:00
Release 1.11.2 (#101)
* 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 <68208993+KrazyxWolf@users.noreply.github.com> Co-authored-by: Huynh Tien <huynhqtienvtag@gmail.com>
This commit is contained in:
parent
70457afe65
commit
d93f0608ec
32
pom.xml
32
pom.xml
@ -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>
|
||||
@ -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>
|
||||
|
@ -25,6 +25,7 @@ import org.bukkit.World;
|
||||
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;
|
||||
@ -241,11 +242,9 @@ public class WarpSignsManager {
|
||||
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();
|
||||
|
@ -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!"
|
||||
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 con este texto [text] arriba"
|
||||
warpTip: "&6Coloca un cartel que contenga el texto [text] arriba"
|
||||
warpToPlayersSign: "&6Teletransportandote al warp de [player]"
|
@ -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:
|
||||
|
@ -157,6 +157,7 @@ public class WarpSignsManagerTest {
|
||||
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);
|
||||
|
@ -166,6 +166,7 @@ public class WarpSignsListenerTest {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user