mirror of
https://github.com/BentoBoxWorld/Warps.git
synced 2024-11-26 04:25:40 +01:00
The Flattening + renamed to "WelcomeWarps" + codemc CI
This commit is contained in:
parent
9284cf7287
commit
695e8b4c6b
20
pom.xml
20
pom.xml
@ -3,7 +3,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>bskyblock.addon</groupId>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>WelcomeWarpSigns</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
|
||||
@ -18,11 +18,27 @@
|
||||
<url>https://github.com/BentoBoxWorld/addon-welcomewarpsigns</url>
|
||||
</scm>
|
||||
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
<url>http://ci.codemc.org/job/BentoBoxWorld/job/addon-welcomewarpsigns</url>
|
||||
</ciManagement>
|
||||
|
||||
<issueManagement>
|
||||
<system>GitHub</system>
|
||||
<url>https://github.com/BentoBoxWorld/addon-welcomewarpsigns/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>codemc-snapshots</id>
|
||||
<url>https://repo.codemc.org/repository/maven-snapshots</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>codemc-releases</id>
|
||||
<url>https://repo.codemc.org/repository/maven-releases</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
@ -73,7 +89,7 @@
|
||||
<version>0.12.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>bskyblock.addon</groupId>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>Level</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps;
|
||||
package world.bentobox.warps;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@ -6,10 +6,10 @@ import java.util.UUID;
|
||||
|
||||
import org.bukkit.World;
|
||||
|
||||
import bentobox.addon.level.Level;
|
||||
import bentobox.addon.warps.commands.WarpCommand;
|
||||
import bentobox.addon.warps.commands.WarpsCommand;
|
||||
import bentobox.addon.warps.config.PluginConfig;
|
||||
import world.bentobox.level.Level;
|
||||
import world.bentobox.warps.commands.WarpCommand;
|
||||
import world.bentobox.warps.commands.WarpsCommand;
|
||||
import world.bentobox.warps.config.PluginConfig;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.addons.Addon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
@ -24,15 +24,15 @@ public class Warp extends Addon {
|
||||
|
||||
private static final String BSKYBLOCK = "BSkyBlock";
|
||||
private static final String ACIDISLAND = "AcidIsland";
|
||||
private static final String LEVEL_PLUGIN_NAME = "BentoBox-Level";
|
||||
private static final String LEVEL_ADDON_NAME = "Level";
|
||||
|
||||
// The plugin instance.
|
||||
private BentoBox plugin;
|
||||
|
||||
// Warp panel object
|
||||
// Warp panel objects
|
||||
private WarpPanelManager warpPanelManager;
|
||||
|
||||
// Warps signs object
|
||||
// Warps signs objects
|
||||
private WarpSignsManager warpSignsManager;
|
||||
|
||||
private Set<World> registeredWorlds;
|
||||
@ -126,7 +126,7 @@ public class Warp extends Addon {
|
||||
* @return island level or null if there is no level plugin
|
||||
*/
|
||||
public Long getLevel(World world, UUID uniqueId) {
|
||||
return plugin.getAddonsManager().getAddonByName(LEVEL_PLUGIN_NAME).map(l -> ((Level) l).getIslandLevel(world, uniqueId)).orElse(null);
|
||||
return plugin.getAddonsManager().getAddonByName(LEVEL_ADDON_NAME).map(l -> ((Level) l).getIslandLevel(world, uniqueId)).orElse(null);
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps;
|
||||
package world.bentobox.warps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps;
|
||||
package world.bentobox.warps;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@ -15,7 +15,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.SignChangeEvent;
|
||||
|
||||
import bentobox.addon.warps.event.WarpRemoveEvent;
|
||||
import world.bentobox.warps.event.WarpRemoveEvent;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps;
|
||||
package world.bentobox.warps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -24,9 +24,9 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.Sign;
|
||||
|
||||
import bentobox.addon.warps.database.object.WarpsData;
|
||||
import bentobox.addon.warps.event.WarpInitiateEvent;
|
||||
import bentobox.addon.warps.event.WarpListEvent;
|
||||
import world.bentobox.warps.objects.WarpsData;
|
||||
import world.bentobox.warps.event.WarpInitiateEvent;
|
||||
import world.bentobox.warps.event.WarpListEvent;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.database.Database;
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps.commands;
|
||||
package world.bentobox.warps.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -6,7 +6,7 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package bentobox.addon.warps.commands;
|
||||
package world.bentobox.warps.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package bentobox.addon.warps.config;
|
||||
package world.bentobox.warps.config;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
|
||||
public class PluginConfig {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps.event;
|
||||
package world.bentobox.warps.event;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@ -6,7 +6,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
|
||||
/**
|
||||
* This event is fired when a Warp is created
|
||||
@ -22,7 +22,7 @@ public class WarpCreateEvent extends Event{
|
||||
private UUID creator;
|
||||
|
||||
/**
|
||||
* @param plugin - BSkyBlock plugin object
|
||||
* @param plugin - BSkyBlock plugin objects
|
||||
* @param warpLoc
|
||||
* @param creator
|
||||
*/
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps.event;
|
||||
package world.bentobox.warps.event;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@ -7,7 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
|
||||
/**
|
||||
* This event is fired when a player tries to do a warp
|
||||
@ -23,7 +23,7 @@ public class WarpInitiateEvent extends Event implements Cancellable {
|
||||
private final UUID player;
|
||||
|
||||
/**
|
||||
* @param plugin - BSkyBlock plugin object
|
||||
* @param plugin - BSkyBlock plugin objects
|
||||
* @param warpLoc - where the player is warping to
|
||||
* @param player - the UUID of the player
|
||||
*/
|
@ -15,7 +15,7 @@
|
||||
* along with ASkyBlock. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
|
||||
package bentobox.addon.warps.event;
|
||||
package world.bentobox.warps.event;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@ -23,7 +23,7 @@ import java.util.UUID;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
|
||||
/**
|
||||
* This event is fired when request is made for a sorted list of warps or when
|
||||
@ -39,7 +39,7 @@ public class WarpListEvent extends Event {
|
||||
private List<UUID> warps;
|
||||
|
||||
/**
|
||||
* @param plugin - BSkyBlock plugin object
|
||||
* @param plugin - BSkyBlock plugin objects
|
||||
* @param warps
|
||||
*/
|
||||
public WarpListEvent(Warp plugin, List<UUID> warps) {
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps.event;
|
||||
package world.bentobox.warps.event;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@ -6,7 +6,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import bentobox.addon.warps.Warp;
|
||||
import world.bentobox.warps.Warp;
|
||||
|
||||
/**
|
||||
* This event is fired when a Warp is removed (when a warp sign is broken)
|
||||
@ -22,7 +22,7 @@ public class WarpRemoveEvent extends Event{
|
||||
private UUID remover;
|
||||
|
||||
/**
|
||||
* @param plugin - BSkyBlock plugin object
|
||||
* @param plugin - BSkyBlock plugin objects
|
||||
* @param warpLoc
|
||||
* @param remover
|
||||
*/
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps.database.object;
|
||||
package world.bentobox.warps.objects;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -41,7 +41,7 @@ public class WarpsData implements DataObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts all the data from the map into this object ready for saving
|
||||
* Puts all the data from the map into this objects ready for saving
|
||||
* @param worldsWarpList
|
||||
* @return this class filled with data
|
||||
*/
|
@ -1,5 +1,5 @@
|
||||
name: BentoBox-WelcomeWarps
|
||||
main: bentobox.addon.warps.Warp
|
||||
name: WelcomeWarps
|
||||
main: world.bentobox.warps.Warp
|
||||
version: ${version}
|
||||
|
||||
authors: tastybento
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package bentobox.addon.warps;
|
||||
package world.bentobox.warps;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
@ -30,6 +30,9 @@ import org.powermock.modules.junit4.PowerMockRunner;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.managers.PlayersManager;
|
||||
import world.bentobox.warps.Warp;
|
||||
import world.bentobox.warps.WarpPanelManager;
|
||||
import world.bentobox.warps.WarpSignsManager;
|
||||
|
||||
/**
|
||||
* @author ben
|
||||
@ -99,7 +102,7 @@ public class WarpPanelManagerTest {
|
||||
when(Bukkit.createInventory(Mockito.any(), Mockito.anyInt(), Mockito.any())).thenReturn(top); }
|
||||
|
||||
/**
|
||||
* Test method for {@link bentobox.addon.warps.WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
* Test method for {@link WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
*/
|
||||
@Test
|
||||
public void testShowWarpPanelFirst() {
|
||||
@ -111,7 +114,7 @@ public class WarpPanelManagerTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link bentobox.addon.warps.WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
* Test method for {@link WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
*/
|
||||
@Test
|
||||
public void testShowWarpPanelMiddle() {
|
||||
@ -123,7 +126,7 @@ public class WarpPanelManagerTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link bentobox.addon.warps.WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
* Test method for {@link WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
*/
|
||||
@Test
|
||||
public void testShowWarpPanelLast() {
|
||||
@ -135,7 +138,7 @@ public class WarpPanelManagerTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link bentobox.addon.warps.WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
* Test method for {@link WarpPanelManager#showWarpPanel(org.bukkit.World, world.bentobox.bbox.api.user.User, int)}.
|
||||
*/
|
||||
@Test
|
||||
public void testShowWarpPanelTestCache() {
|
||||
@ -150,7 +153,7 @@ public class WarpPanelManagerTest {
|
||||
|
||||
|
||||
/**
|
||||
* Test method for {@link bentobox.addon.warps.WarpPanelManager#removeWarp(org.bukkit.World, java.util.UUID)}.
|
||||
* Test method for {@link WarpPanelManager#removeWarp(org.bukkit.World, java.util.UUID)}.
|
||||
*/
|
||||
@Test
|
||||
public void testRemoveWarp() {
|
@ -1,4 +1,4 @@
|
||||
package bentobox.addon.warps;
|
||||
package world.bentobox.warps;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@ -33,7 +33,10 @@ import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import bentobox.addon.warps.config.PluginConfig;
|
||||
import world.bentobox.warps.Warp;
|
||||
import world.bentobox.warps.WarpSignsListener;
|
||||
import world.bentobox.warps.WarpSignsManager;
|
||||
import world.bentobox.warps.config.PluginConfig;
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.managers.IslandsManager;
|
Loading…
Reference in New Issue
Block a user