From d14ad977abc4d77cf159ecae0c81d7e3840fa14e Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 22 Jan 2022 13:14:57 -0800 Subject: [PATCH] Clean up imports. --- .../world/bentobox/bentobox/BentoBox.java | 15 +++++++- .../api/events/addon/AddonDisableEvent.java | 2 +- .../api/events/addon/AddonEnableEvent.java | 2 +- .../api/events/addon/AddonGeneralEvent.java | 2 +- .../api/events/addon/AddonLoadEvent.java | 2 +- .../api/events/command/CommandEvent.java | 2 +- .../flags/FlagProtectionChangeEvent.java | 2 +- .../events/flags/FlagSettingChangeEvent.java | 2 +- .../flags/FlagWorldSettingChangeEvent.java | 2 +- .../api/events/island/IslandBanEvent.java | 2 +- .../api/events/island/IslandCreatedEvent.java | 2 +- .../island/IslandDeleteChunksEvent.java | 2 +- .../api/events/island/IslandDeleteEvent.java | 2 +- .../api/events/island/IslandDeletedEvent.java | 2 +- .../api/events/island/IslandExpelEvent.java | 2 +- .../api/events/island/IslandGeneralEvent.java | 2 +- .../api/events/island/IslandLockEvent.java | 2 +- .../events/island/IslandNewIslandEvent.java | 2 +- .../events/island/IslandPreCreateEvent.java | 2 +- .../IslandProtectionRangeChangeEvent.java | 2 +- .../events/island/IslandRankChangeEvent.java | 2 +- .../events/island/IslandRegisteredEvent.java | 2 +- .../events/island/IslandReservedEvent.java | 2 +- .../api/events/island/IslandUnbanEvent.java | 2 +- .../api/events/island/IslandUnlockEvent.java | 2 +- .../island/IslandUnregisteredEvent.java | 2 +- .../api/events/team/TeamDeleteEvent.java | 2 +- .../api/events/team/TeamGeneralEvent.java | 2 +- .../api/events/team/TeamInfoEvent.java | 2 +- .../api/events/team/TeamInviteEvent.java | 2 +- .../api/events/team/TeamJoinEvent.java | 2 +- .../api/events/team/TeamJoinedEvent.java | 2 +- .../api/events/team/TeamKickEvent.java | 2 +- .../api/events/team/TeamLeaveEvent.java | 2 +- .../api/events/team/TeamRejectEvent.java | 2 +- .../api/events/team/TeamSetownerEvent.java | 2 +- .../api/events/team/TeamUninviteEvent.java | 2 +- .../bentobox/api/panels/TemplatedPanel.java | 7 ++-- .../builders/TemplatedPanelBuilder.java | 3 +- .../api/panels/reader/ItemTemplateRecord.java | 11 +++--- .../panels/reader/PanelTemplateRecord.java | 1 + .../api/panels/reader/TemplateReader.java | 12 ++++--- .../AddonPlaceholderExpansion.java | 1 + .../BentoBoxPlaceholderExpansion.java | 1 + .../bentobox/bentobox/api/user/Notifier.java | 3 +- .../conversation/DescriptionPrompt.java | 2 +- .../DescriptionSuccessPrompt.java | 2 +- .../conversation/NameConversationPrefix.java | 2 +- .../json/BentoboxTypeAdapterFactory.java | 10 +++++- .../json/adapters/BiomeTypeAdapter.java | 12 ++++--- .../mongodb/MongoDBDatabaseHandler.java | 2 +- .../bentobox/hooks/LangUtilsHook.java | 12 ++++--- .../flags/clicklisteners/GeoMobLimitTab.java | 1 - .../VisitorKeepInventoryListener.java | 5 +-- .../bentobox/managers/AddonsManager.java | 6 +++- .../managers/IslandChunkDeletionManager.java | 8 ++--- .../settings/WorldDefaultSettingsTab.java | 2 +- .../bentobox/util/DeleteIslandChunks.java | 17 +++++----- .../bentobox/bentobox/util/ItemParser.java | 17 ++++++---- .../util/teleport/SafeSpotTeleport.java | 34 +++++++++++-------- .../admin/AdminSwitchCommandTest.java | 7 ++-- .../team/IslandTeamSetownerCommandTest.java | 4 ++- .../PetTeleportListenerTest.java | 3 +- .../VisitorKeepInventoryListenerTest.java | 2 +- 64 files changed, 166 insertions(+), 108 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/BentoBox.java b/src/main/java/world/bentobox/bentobox/BentoBox.java index ee0fd48c8..981addb44 100644 --- a/src/main/java/world/bentobox/bentobox/BentoBox.java +++ b/src/main/java/world/bentobox/bentobox/BentoBox.java @@ -30,7 +30,20 @@ import world.bentobox.bentobox.listeners.JoinLeaveListener; import world.bentobox.bentobox.listeners.PanelListenerManager; import world.bentobox.bentobox.listeners.PortalTeleportationListener; import world.bentobox.bentobox.listeners.StandardSpawnProtectionListener; -import world.bentobox.bentobox.managers.*; +import world.bentobox.bentobox.managers.AddonsManager; +import world.bentobox.bentobox.managers.BlueprintsManager; +import world.bentobox.bentobox.managers.CommandsManager; +import world.bentobox.bentobox.managers.FlagsManager; +import world.bentobox.bentobox.managers.HooksManager; +import world.bentobox.bentobox.managers.IslandChunkDeletionManager; +import world.bentobox.bentobox.managers.IslandDeletionManager; +import world.bentobox.bentobox.managers.IslandWorldManager; +import world.bentobox.bentobox.managers.IslandsManager; +import world.bentobox.bentobox.managers.LocalesManager; +import world.bentobox.bentobox.managers.PlaceholdersManager; +import world.bentobox.bentobox.managers.PlayersManager; +import world.bentobox.bentobox.managers.RanksManager; +import world.bentobox.bentobox.managers.WebManager; import world.bentobox.bentobox.util.heads.HeadGetter; import world.bentobox.bentobox.versions.ServerCompatibility; diff --git a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonDisableEvent.java b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonDisableEvent.java index 24e384702..10cb2f584 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonDisableEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonDisableEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.addon; import java.util.Map; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.addons.Addon; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonEnableEvent.java b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonEnableEvent.java index 0b15d1ff2..126f74c2b 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonEnableEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonEnableEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.addon; import java.util.Map; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.addons.Addon; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonGeneralEvent.java b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonGeneralEvent.java index 8d6a70931..5b7eab672 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonGeneralEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonGeneralEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.addon; import java.util.Map; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.addons.Addon; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonLoadEvent.java b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonLoadEvent.java index 4228ff623..dfd02ef25 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/addon/AddonLoadEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/addon/AddonLoadEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.addon; import java.util.Map; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.addons.Addon; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/command/CommandEvent.java b/src/main/java/world/bentobox/bentobox/api/events/command/CommandEvent.java index 2686d6a84..b248f7f99 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/command/CommandEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/command/CommandEvent.java @@ -5,8 +5,8 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.BentoBoxEvent; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/flags/FlagProtectionChangeEvent.java b/src/main/java/world/bentobox/bentobox/api/events/flags/FlagProtectionChangeEvent.java index 1b6f3c018..13a9bea71 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/flags/FlagProtectionChangeEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/flags/FlagProtectionChangeEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.flags; import java.util.UUID; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.flags.Flag; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/flags/FlagSettingChangeEvent.java b/src/main/java/world/bentobox/bentobox/api/events/flags/FlagSettingChangeEvent.java index bbe6d8d0c..45a4874ab 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/flags/FlagSettingChangeEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/flags/FlagSettingChangeEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.flags; import java.util.UUID; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.flags.Flag; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/flags/FlagWorldSettingChangeEvent.java b/src/main/java/world/bentobox/bentobox/api/events/flags/FlagWorldSettingChangeEvent.java index 307542a82..6c8e7f94a 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/flags/FlagWorldSettingChangeEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/flags/FlagWorldSettingChangeEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.World; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.flags.Flag; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandBanEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandBanEvent.java index fb078e00e..c1e5b3a4f 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandBanEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandBanEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandCreatedEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandCreatedEvent.java index dcfb602cf..303a7ab03 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandCreatedEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandCreatedEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteChunksEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteChunksEvent.java index 380da8974..f05ebabdf 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteChunksEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteChunksEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.database.objects.IslandDeletion; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteEvent.java index 4a46eba36..dec404e22 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeleteEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeletedEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeletedEvent.java index b566f9b32..f3d31de98 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeletedEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandDeletedEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.database.objects.IslandDeletion; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandExpelEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandExpelEvent.java index f60d1a770..f412810fd 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandExpelEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandExpelEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandGeneralEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandGeneralEvent.java index c8f9cc3ae..597f9caf8 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandGeneralEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandGeneralEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandLockEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandLockEvent.java index 9783c9e1c..39322bd13 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandLockEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandLockEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandNewIslandEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandNewIslandEvent.java index 583cbea40..babdb66be 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandNewIslandEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandNewIslandEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandPreCreateEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandPreCreateEvent.java index 99fa17e2f..698ab59c1 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandPreCreateEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandPreCreateEvent.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.api.events.island; import java.util.UUID; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; /** diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandProtectionRangeChangeEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandProtectionRangeChangeEvent.java index d033f5fa5..d38d21a3b 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandProtectionRangeChangeEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandProtectionRangeChangeEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandRankChangeEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandRankChangeEvent.java index e27f1b0ca..67167f03f 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandRankChangeEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandRankChangeEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandRegisteredEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandRegisteredEvent.java index c8b77c2a8..c3189fed2 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandRegisteredEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandRegisteredEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandReservedEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandReservedEvent.java index e8dc7738b..3a8fb474c 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandReservedEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandReservedEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnbanEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnbanEvent.java index 94ab59e1e..b02d3339c 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnbanEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnbanEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnlockEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnlockEvent.java index c44437497..95726975e 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnlockEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnlockEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnregisteredEvent.java b/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnregisteredEvent.java index c3304cf9e..d11d9c1fc 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnregisteredEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/island/IslandUnregisteredEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamDeleteEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamDeleteEvent.java index 863a6591c..0317b7c7a 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamDeleteEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamDeleteEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamGeneralEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamGeneralEvent.java index 1e71493eb..1a3a862bf 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamGeneralEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamGeneralEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamInfoEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamInfoEvent.java index 14dbc8214..0cf632e8b 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamInfoEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamInfoEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamInviteEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamInviteEvent.java index 1a1fca2f2..6bd40dcbe 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamInviteEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamInviteEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinEvent.java index 73940e019..6523a113e 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinedEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinedEvent.java index e750154a0..7164d3c59 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinedEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamJoinedEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamKickEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamKickEvent.java index 00a8a11ff..f3bd18b14 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamKickEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamKickEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamLeaveEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamLeaveEvent.java index 28ca431a0..d4c16a7af 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamLeaveEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamLeaveEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamRejectEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamRejectEvent.java index adcd4359c..218b88746 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamRejectEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamRejectEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamSetownerEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamSetownerEvent.java index 2d0b81892..e907cf91a 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamSetownerEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamSetownerEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/events/team/TeamUninviteEvent.java b/src/main/java/world/bentobox/bentobox/api/events/team/TeamUninviteEvent.java index 60953cd8e..2a07712bb 100644 --- a/src/main/java/world/bentobox/bentobox/api/events/team/TeamUninviteEvent.java +++ b/src/main/java/world/bentobox/bentobox/api/events/team/TeamUninviteEvent.java @@ -4,8 +4,8 @@ import java.util.UUID; import org.bukkit.Location; import org.bukkit.event.HandlerList; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.events.IslandBaseEvent; import world.bentobox.bentobox.database.objects.Island; diff --git a/src/main/java/world/bentobox/bentobox/api/panels/TemplatedPanel.java b/src/main/java/world/bentobox/bentobox/api/panels/TemplatedPanel.java index 4f4afdbfa..c3429f717 100644 --- a/src/main/java/world/bentobox/bentobox/api/panels/TemplatedPanel.java +++ b/src/main/java/world/bentobox/bentobox/api/panels/TemplatedPanel.java @@ -7,10 +7,13 @@ package world.bentobox.bentobox.api.panels; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; +import java.util.function.BiFunction; + import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; -import java.util.*; -import java.util.function.BiFunction; import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder; diff --git a/src/main/java/world/bentobox/bentobox/api/panels/builders/TemplatedPanelBuilder.java b/src/main/java/world/bentobox/bentobox/api/panels/builders/TemplatedPanelBuilder.java index fa8ea51e3..851829df3 100644 --- a/src/main/java/world/bentobox/bentobox/api/panels/builders/TemplatedPanelBuilder.java +++ b/src/main/java/world/bentobox/bentobox/api/panels/builders/TemplatedPanelBuilder.java @@ -7,12 +7,13 @@ package world.bentobox.bentobox.api.panels.builders; -import org.bukkit.World; import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.function.BiFunction; +import org.bukkit.World; + import world.bentobox.bentobox.api.panels.PanelItem; import world.bentobox.bentobox.api.panels.PanelListener; import world.bentobox.bentobox.api.panels.TemplatedPanel; diff --git a/src/main/java/world/bentobox/bentobox/api/panels/reader/ItemTemplateRecord.java b/src/main/java/world/bentobox/bentobox/api/panels/reader/ItemTemplateRecord.java index fe8e39974..f00dbc592 100644 --- a/src/main/java/world/bentobox/bentobox/api/panels/reader/ItemTemplateRecord.java +++ b/src/main/java/world/bentobox/bentobox/api/panels/reader/ItemTemplateRecord.java @@ -7,15 +7,18 @@ package world.bentobox.bentobox.api.panels.reader; -import org.bukkit.event.inventory.ClickType; -import org.bukkit.inventory.ItemStack; -import org.eclipse.jdt.annotation.NonNull; -import org.eclipse.jdt.annotation.Nullable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.inventory.ItemStack; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; + +import world.bentobox.bentobox.api.panels.reader.ItemTemplateRecord.ActionRecords; + /** * This Record contains all necessary information about Item Template that can be used to craft panel item. diff --git a/src/main/java/world/bentobox/bentobox/api/panels/reader/PanelTemplateRecord.java b/src/main/java/world/bentobox/bentobox/api/panels/reader/PanelTemplateRecord.java index 2a20c99d0..2bd0a2e49 100644 --- a/src/main/java/world/bentobox/bentobox/api/panels/reader/PanelTemplateRecord.java +++ b/src/main/java/world/bentobox/bentobox/api/panels/reader/PanelTemplateRecord.java @@ -15,6 +15,7 @@ import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import world.bentobox.bentobox.api.panels.Panel; +import world.bentobox.bentobox.api.panels.reader.PanelTemplateRecord.TemplateItem; /** diff --git a/src/main/java/world/bentobox/bentobox/api/panels/reader/TemplateReader.java b/src/main/java/world/bentobox/bentobox/api/panels/reader/TemplateReader.java index 7721746b0..f913b207b 100644 --- a/src/main/java/world/bentobox/bentobox/api/panels/reader/TemplateReader.java +++ b/src/main/java/world/bentobox/bentobox/api/panels/reader/TemplateReader.java @@ -7,7 +7,11 @@ package world.bentobox.bentobox.api.panels.reader; -import com.google.common.base.Enums; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; @@ -15,10 +19,8 @@ import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.event.inventory.ClickType; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; + +import com.google.common.base.Enums; import world.bentobox.bentobox.api.panels.Panel; import world.bentobox.bentobox.util.ItemParser; diff --git a/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/AddonPlaceholderExpansion.java b/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/AddonPlaceholderExpansion.java index 83115c750..1aa5b12e8 100644 --- a/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/AddonPlaceholderExpansion.java +++ b/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/AddonPlaceholderExpansion.java @@ -1,6 +1,7 @@ package world.bentobox.bentobox.api.placeholders.placeholderapi; import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.addons.Addon; public class AddonPlaceholderExpansion extends BasicPlaceholderExpansion { diff --git a/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/BentoBoxPlaceholderExpansion.java b/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/BentoBoxPlaceholderExpansion.java index c00e98384..fe2ec60e8 100644 --- a/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/BentoBoxPlaceholderExpansion.java +++ b/src/main/java/world/bentobox/bentobox/api/placeholders/placeholderapi/BentoBoxPlaceholderExpansion.java @@ -1,6 +1,7 @@ package world.bentobox.bentobox.api.placeholders.placeholderapi; import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.BentoBox; public class BentoBoxPlaceholderExpansion extends BasicPlaceholderExpansion { diff --git a/src/main/java/world/bentobox/bentobox/api/user/Notifier.java b/src/main/java/world/bentobox/bentobox/api/user/Notifier.java index b78888cd8..84fb8822e 100644 --- a/src/main/java/world/bentobox/bentobox/api/user/Notifier.java +++ b/src/main/java/world/bentobox/bentobox/api/user/Notifier.java @@ -3,10 +3,11 @@ package world.bentobox.bentobox.api.user; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import org.eclipse.jdt.annotation.NonNull; + import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; -import org.eclipse.jdt.annotation.NonNull; /** * Utilities class that helps to avoid spamming the User with potential repeated messages diff --git a/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionPrompt.java b/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionPrompt.java index 661b6000d..2b28618c2 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionPrompt.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionPrompt.java @@ -7,8 +7,8 @@ import org.bukkit.conversations.ConversationContext; import org.bukkit.conversations.Prompt; import org.bukkit.conversations.StringPrompt; import org.bukkit.entity.Player; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.addons.GameModeAddon; import world.bentobox.bentobox.api.localization.TextVariables; import world.bentobox.bentobox.api.user.User; diff --git a/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionSuccessPrompt.java b/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionSuccessPrompt.java index e5e78341e..279c38ab3 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionSuccessPrompt.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/conversation/DescriptionSuccessPrompt.java @@ -6,8 +6,8 @@ import org.bukkit.conversations.ConversationContext; import org.bukkit.conversations.MessagePrompt; import org.bukkit.conversations.Prompt; import org.bukkit.entity.Player; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.addons.GameModeAddon; import world.bentobox.bentobox.api.user.User; diff --git a/src/main/java/world/bentobox/bentobox/blueprints/conversation/NameConversationPrefix.java b/src/main/java/world/bentobox/bentobox/blueprints/conversation/NameConversationPrefix.java index 0da78ac24..aee43be76 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/conversation/NameConversationPrefix.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/conversation/NameConversationPrefix.java @@ -3,8 +3,8 @@ package world.bentobox.bentobox.blueprints.conversation; import org.bukkit.conversations.ConversationContext; import org.bukkit.conversations.ConversationPrefix; import org.bukkit.entity.Player; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.user.User; public class NameConversationPrefix implements ConversationPrefix { diff --git a/src/main/java/world/bentobox/bentobox/database/json/BentoboxTypeAdapterFactory.java b/src/main/java/world/bentobox/bentobox/database/json/BentoboxTypeAdapterFactory.java index 405e9aa28..b9582485e 100644 --- a/src/main/java/world/bentobox/bentobox/database/json/BentoboxTypeAdapterFactory.java +++ b/src/main/java/world/bentobox/bentobox/database/json/BentoboxTypeAdapterFactory.java @@ -17,7 +17,15 @@ import com.google.gson.reflect.TypeToken; import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.flags.Flag; -import world.bentobox.bentobox.database.json.adapters.*; +import world.bentobox.bentobox.database.json.adapters.BiomeTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.BukkitObjectTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.EnumTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.FlagTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.ItemStackTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.LocationTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.PotionEffectTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.VectorTypeAdapter; +import world.bentobox.bentobox.database.json.adapters.WorldTypeAdapter; import world.bentobox.bentobox.versions.ServerCompatibility; diff --git a/src/main/java/world/bentobox/bentobox/database/json/adapters/BiomeTypeAdapter.java b/src/main/java/world/bentobox/bentobox/database/json/adapters/BiomeTypeAdapter.java index f26ed8b20..b30b52b95 100644 --- a/src/main/java/world/bentobox/bentobox/database/json/adapters/BiomeTypeAdapter.java +++ b/src/main/java/world/bentobox/bentobox/database/json/adapters/BiomeTypeAdapter.java @@ -7,16 +7,18 @@ package world.bentobox.bentobox.database.json.adapters; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonToken; -import com.google.gson.stream.JsonWriter; -import org.bukkit.block.Biome; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.bukkit.block.Biome; + +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonToken; +import com.google.gson.stream.JsonWriter; + /** * Minecraft 1.18 reworked their biomes, and a lot of things were renamed or removed. diff --git a/src/main/java/world/bentobox/bentobox/database/mongodb/MongoDBDatabaseHandler.java b/src/main/java/world/bentobox/bentobox/database/mongodb/MongoDBDatabaseHandler.java index f9efcb15c..d13436fc1 100644 --- a/src/main/java/world/bentobox/bentobox/database/mongodb/MongoDBDatabaseHandler.java +++ b/src/main/java/world/bentobox/bentobox/database/mongodb/MongoDBDatabaseHandler.java @@ -7,6 +7,7 @@ import java.util.concurrent.CompletableFuture; import org.bson.Document; import org.bson.conversions.Bson; import org.bukkit.Bukkit; +import org.eclipse.jdt.annotation.NonNull; import com.google.gson.Gson; import com.mongodb.MongoClientException; @@ -19,7 +20,6 @@ import com.mongodb.client.model.IndexOptions; import com.mongodb.client.model.Indexes; import com.mongodb.util.JSON; -import org.eclipse.jdt.annotation.NonNull; import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.database.DatabaseConnector; import world.bentobox.bentobox.database.json.AbstractJSONDatabaseHandler; diff --git a/src/main/java/world/bentobox/bentobox/hooks/LangUtilsHook.java b/src/main/java/world/bentobox/bentobox/hooks/LangUtilsHook.java index 01c584594..b58864e2f 100644 --- a/src/main/java/world/bentobox/bentobox/hooks/LangUtilsHook.java +++ b/src/main/java/world/bentobox/bentobox/hooks/LangUtilsHook.java @@ -1,6 +1,9 @@ package world.bentobox.bentobox.hooks; -import com.meowj.langutils.lang.LanguageHelper; +import java.util.Locale; +import java.util.Map.Entry; +import java.util.logging.Logger; + import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.Biome; @@ -18,15 +21,14 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionType; import org.jetbrains.annotations.Nullable; + +import com.meowj.langutils.lang.LanguageHelper; + import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.hooks.Hook; import world.bentobox.bentobox.api.user.User; import world.bentobox.bentobox.util.Util; -import java.util.Locale; -import java.util.Map.Entry; -import java.util.logging.Logger; - /** * @author ApacheZy * @since 1.6.0 diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/clicklisteners/GeoMobLimitTab.java b/src/main/java/world/bentobox/bentobox/listeners/flags/clicklisteners/GeoMobLimitTab.java index b4d3179a8..3717c6c04 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/flags/clicklisteners/GeoMobLimitTab.java +++ b/src/main/java/world/bentobox/bentobox/listeners/flags/clicklisteners/GeoMobLimitTab.java @@ -13,7 +13,6 @@ import org.bukkit.event.inventory.ClickType; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; - import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.addons.GameModeAddon; import world.bentobox.bentobox.api.panels.Panel; diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListener.java b/src/main/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListener.java index 6673895ce..3bae913f8 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListener.java @@ -1,17 +1,18 @@ package world.bentobox.bentobox.listeners.flags.worldsettings; +import java.util.Optional; + import org.bukkit.World; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.PlayerDeathEvent; + import world.bentobox.bentobox.api.flags.FlagListener; import world.bentobox.bentobox.api.user.User; import world.bentobox.bentobox.database.objects.Island; import world.bentobox.bentobox.lists.Flags; import world.bentobox.bentobox.util.Util; -import java.util.Optional; - /** * Prevents visitors from losing their items if they * die on an island in which they are a visitor. diff --git a/src/main/java/world/bentobox/bentobox/managers/AddonsManager.java b/src/main/java/world/bentobox/bentobox/managers/AddonsManager.java index 707a9051e..0026d94c3 100644 --- a/src/main/java/world/bentobox/bentobox/managers/AddonsManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/AddonsManager.java @@ -1,6 +1,10 @@ package world.bentobox.bentobox.managers; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandChunkDeletionManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandChunkDeletionManager.java index d7d00035c..7316cd48d 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandChunkDeletionManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandChunkDeletionManager.java @@ -1,13 +1,13 @@ package world.bentobox.bentobox.managers; -import world.bentobox.bentobox.BentoBox; -import world.bentobox.bentobox.database.objects.IslandDeletion; -import world.bentobox.bentobox.util.DeleteIslandChunks; - import java.util.LinkedList; import java.util.Queue; import java.util.concurrent.atomic.AtomicReference; +import world.bentobox.bentobox.BentoBox; +import world.bentobox.bentobox.database.objects.IslandDeletion; +import world.bentobox.bentobox.util.DeleteIslandChunks; + /** * Manages the queue of island chunks to be deleted. */ diff --git a/src/main/java/world/bentobox/bentobox/panels/settings/WorldDefaultSettingsTab.java b/src/main/java/world/bentobox/bentobox/panels/settings/WorldDefaultSettingsTab.java index b41f651b6..5917a93f6 100644 --- a/src/main/java/world/bentobox/bentobox/panels/settings/WorldDefaultSettingsTab.java +++ b/src/main/java/world/bentobox/bentobox/panels/settings/WorldDefaultSettingsTab.java @@ -6,8 +6,8 @@ import java.util.stream.Collectors; import org.bukkit.Material; import org.bukkit.World; - import org.eclipse.jdt.annotation.NonNull; + import world.bentobox.bentobox.api.flags.Flag.Type; import world.bentobox.bentobox.api.flags.clicklisteners.WorldToggleClick; import world.bentobox.bentobox.api.localization.TextVariables; diff --git a/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java b/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java index fb61eec57..0f1c88602 100644 --- a/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java +++ b/src/main/java/world/bentobox/bentobox/util/DeleteIslandChunks.java @@ -1,6 +1,12 @@ package world.bentobox.bentobox.util; -import io.papermc.lib.PaperLib; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.atomic.AtomicBoolean; + import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; @@ -10,6 +16,8 @@ import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator.ChunkData; import org.bukkit.inventory.InventoryHolder; import org.bukkit.scheduler.BukkitTask; + +import io.papermc.lib.PaperLib; import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.addons.GameModeAddon; import world.bentobox.bentobox.api.events.island.IslandEvent; @@ -17,13 +25,6 @@ import world.bentobox.bentobox.api.events.island.IslandEvent.Reason; import world.bentobox.bentobox.database.objects.IslandDeletion; import world.bentobox.bentobox.nms.NMSAbstraction; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Random; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.atomic.AtomicBoolean; - /** * Deletes islands chunk by chunk * diff --git a/src/main/java/world/bentobox/bentobox/util/ItemParser.java b/src/main/java/world/bentobox/bentobox/util/ItemParser.java index feb21ae42..7508312c4 100644 --- a/src/main/java/world/bentobox/bentobox/util/ItemParser.java +++ b/src/main/java/world/bentobox/bentobox/util/ItemParser.java @@ -1,21 +1,26 @@ package world.bentobox.bentobox.util; -import com.mojang.authlib.GameProfile; -import com.mojang.authlib.properties.Property; +import java.lang.reflect.Field; +import java.util.MissingFormatArgumentException; +import java.util.UUID; + import org.bukkit.Bukkit; import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.banner.Pattern; import org.bukkit.block.banner.PatternType; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.*; +import org.bukkit.inventory.meta.BannerMeta; +import org.bukkit.inventory.meta.Damageable; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.PotionMeta; +import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.potion.PotionData; import org.bukkit.potion.PotionType; import org.eclipse.jdt.annotation.Nullable; -import java.lang.reflect.Field; -import java.util.MissingFormatArgumentException; -import java.util.UUID; +import com.mojang.authlib.GameProfile; +import com.mojang.authlib.properties.Property; import world.bentobox.bentobox.BentoBox; diff --git a/src/main/java/world/bentobox/bentobox/util/teleport/SafeSpotTeleport.java b/src/main/java/world/bentobox/bentobox/util/teleport/SafeSpotTeleport.java index 093128f06..a413010e5 100644 --- a/src/main/java/world/bentobox/bentobox/util/teleport/SafeSpotTeleport.java +++ b/src/main/java/world/bentobox/bentobox/util/teleport/SafeSpotTeleport.java @@ -1,19 +1,5 @@ package world.bentobox.bentobox.util.teleport; -import org.bukkit.*; -import org.bukkit.World.Environment; -import org.bukkit.block.BlockFace; -import org.bukkit.entity.Entity; -import org.bukkit.entity.Player; -import org.bukkit.scheduler.BukkitTask; -import org.bukkit.util.Vector; -import org.eclipse.jdt.annotation.Nullable; -import world.bentobox.bentobox.BentoBox; -import world.bentobox.bentobox.api.user.User; -import world.bentobox.bentobox.database.objects.Island; -import world.bentobox.bentobox.util.Pair; -import world.bentobox.bentobox.util.Util; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -21,6 +7,26 @@ import java.util.Objects; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicBoolean; +import org.bukkit.Bukkit; +import org.bukkit.Chunk; +import org.bukkit.ChunkSnapshot; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.World.Environment; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.scheduler.BukkitTask; +import org.bukkit.util.Vector; +import org.eclipse.jdt.annotation.Nullable; + +import world.bentobox.bentobox.BentoBox; +import world.bentobox.bentobox.api.user.User; +import world.bentobox.bentobox.database.objects.Island; +import world.bentobox.bentobox.util.Pair; +import world.bentobox.bentobox.util.Util; + /** * A class that calculates finds a safe spot asynchronously and then teleports the player there. * diff --git a/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminSwitchCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminSwitchCommandTest.java index 46210a565..9aa60dcfe 100644 --- a/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminSwitchCommandTest.java +++ b/src/test/java/world/bentobox/bentobox/api/commands/admin/AdminSwitchCommandTest.java @@ -1,9 +1,12 @@ package world.bentobox.bentobox.api.commands.admin; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static org.mockito.Mockito.*; import java.util.Collections; import java.util.HashMap; diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommandTest.java index c0b16321b..c15064a1b 100644 --- a/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommandTest.java +++ b/src/test/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamSetownerCommandTest.java @@ -1,6 +1,8 @@ package world.bentobox.bentobox.api.commands.island.team; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; diff --git a/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/PetTeleportListenerTest.java b/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/PetTeleportListenerTest.java index c67538860..c2e1a3a4e 100644 --- a/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/PetTeleportListenerTest.java +++ b/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/PetTeleportListenerTest.java @@ -2,12 +2,11 @@ package world.bentobox.bentobox.listeners.flags.worldsettings; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Optional; -import static org.mockito.Mockito.*; - import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.AnimalTamer; diff --git a/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListenerTest.java b/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListenerTest.java index e10047fee..c87ce4501 100644 --- a/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListenerTest.java +++ b/src/test/java/world/bentobox/bentobox/listeners/flags/worldsettings/VisitorKeepInventoryListenerTest.java @@ -8,8 +8,8 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; -import static org.mockito.Mockito.when; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.Collections;