From d69e6b83abda1a20972c4407842c226e73775a8c Mon Sep 17 00:00:00 2001 From: Hai_tun <1346653001@qq.com> Date: Tue, 22 Dec 2020 16:03:26 +0800 Subject: [PATCH 1/2] Change package name from `com.sk89q` to `cl.bgmp` --- pom.xml | 8 ++++---- src/main/java/fun/lewisdev/deluxehub/DeluxeHub.java | 10 +++++----- .../fun/lewisdev/deluxehub/command/CommandManager.java | 10 +++++----- .../deluxehub/command/commands/ClearchatCommand.java | 6 +++--- .../deluxehub/command/commands/DeluxeHubCommand.java | 6 +++--- .../deluxehub/command/commands/FlyCommand.java | 6 +++--- .../deluxehub/command/commands/LobbyCommand.java | 6 +++--- .../deluxehub/command/commands/LockchatCommand.java | 6 +++--- .../deluxehub/command/commands/SetLobbyCommand.java | 6 +++--- .../deluxehub/command/commands/VanishCommand.java | 6 +++--- .../command/commands/gamemode/AdventureCommand.java | 6 +++--- .../command/commands/gamemode/CreativeCommand.java | 6 +++--- .../command/commands/gamemode/GamemodeCommand.java | 6 +++--- .../command/commands/gamemode/SpectatorCommand.java | 6 +++--- .../command/commands/gamemode/SurvivalCommand.java | 6 +++--- 15 files changed, 50 insertions(+), 50 deletions(-) diff --git a/pom.xml b/pom.xml index af9a8218..a2f1b0c5 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ org.bstats:bstats-bukkit-lite - com.sk89q:command-framework-bukkit + cl.bgmp:command-framework-bukkit javax.inject:javax.inject de.tr7zw:item-nbt-api @@ -63,7 +63,7 @@ fun.lewisdev.deluxehub.libs.metrics - com.sk89q + cl.bgmp fun.lewisdev.deluxehub.libs.commandframework @@ -153,9 +153,9 @@ 1.2 - com.sk89q + cl.bgmp command-framework-bukkit - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT de.tr7zw diff --git a/src/main/java/fun/lewisdev/deluxehub/DeluxeHub.java b/src/main/java/fun/lewisdev/deluxehub/DeluxeHub.java index 54dc8687..db15c511 100644 --- a/src/main/java/fun/lewisdev/deluxehub/DeluxeHub.java +++ b/src/main/java/fun/lewisdev/deluxehub/DeluxeHub.java @@ -1,10 +1,10 @@ package fun.lewisdev.deluxehub; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; -import com.sk89q.minecraft.util.commands.exceptions.CommandPermissionsException; -import com.sk89q.minecraft.util.commands.exceptions.CommandUsageException; -import com.sk89q.minecraft.util.commands.exceptions.MissingNestedCommandException; -import com.sk89q.minecraft.util.commands.exceptions.WrappedCommandException; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.exceptions.CommandPermissionsException; +import cl.bgmp.minecraft.util.commands.exceptions.CommandUsageException; +import cl.bgmp.minecraft.util.commands.exceptions.MissingNestedCommandException; +import cl.bgmp.minecraft.util.commands.exceptions.WrappedCommandException; import fun.lewisdev.deluxehub.action.ActionManager; import fun.lewisdev.deluxehub.command.CommandManager; import fun.lewisdev.deluxehub.config.ConfigManager; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/CommandManager.java b/src/main/java/fun/lewisdev/deluxehub/command/CommandManager.java index 00a631cb..e3f10c7c 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/CommandManager.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/CommandManager.java @@ -1,10 +1,10 @@ package fun.lewisdev.deluxehub.command; -import com.sk89q.bukkit.util.BukkitCommandsManager; -import com.sk89q.bukkit.util.CommandsManagerRegistration; -import com.sk89q.minecraft.util.commands.CommandsManager; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; -import com.sk89q.minecraft.util.commands.injection.SimpleInjector; +import cl.bgmp.bukkit.util.BukkitCommandsManager; +import cl.bgmp.bukkit.util.CommandsManagerRegistration; +import cl.bgmp.minecraft.util.commands.CommandsManager; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.injection.SimpleInjector; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.command.commands.*; import fun.lewisdev.deluxehub.command.commands.gamemode.*; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/ClearchatCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/ClearchatCommand.java index 57b1e68b..ae70aef2 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/ClearchatCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/ClearchatCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/DeluxeHubCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/DeluxeHubCommand.java index ad935976..0d32fdd3 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/DeluxeHubCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/DeluxeHubCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.command.CommandManager; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/FlyCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/FlyCommand.java index ca0d92eb..2784a6d7 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/FlyCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/FlyCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/LobbyCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/LobbyCommand.java index 3bfe5840..4cbd2911 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/LobbyCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/LobbyCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.module.ModuleType; import fun.lewisdev.deluxehub.module.modules.world.LobbySpawn; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/LockchatCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/LockchatCommand.java index 8e523678..53c22b81 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/LockchatCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/LockchatCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/SetLobbyCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/SetLobbyCommand.java index 258078d8..602eabe4 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/SetLobbyCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/SetLobbyCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/VanishCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/VanishCommand.java index b203d9f2..ca61aab4 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/VanishCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/VanishCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/AdventureCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/AdventureCommand.java index efba6f76..0e107a1b 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/AdventureCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/AdventureCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands.gamemode; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/CreativeCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/CreativeCommand.java index 7be1d5b2..01baf7eb 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/CreativeCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/CreativeCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands.gamemode; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/GamemodeCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/GamemodeCommand.java index df0f37d9..25244108 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/GamemodeCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/GamemodeCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands.gamemode; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SpectatorCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SpectatorCommand.java index a5c69f0a..734f69c3 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SpectatorCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SpectatorCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands.gamemode; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; diff --git a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SurvivalCommand.java b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SurvivalCommand.java index 01de1be4..379b0e2f 100644 --- a/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SurvivalCommand.java +++ b/src/main/java/fun/lewisdev/deluxehub/command/commands/gamemode/SurvivalCommand.java @@ -1,8 +1,8 @@ package fun.lewisdev.deluxehub.command.commands.gamemode; -import com.sk89q.minecraft.util.commands.CommandContext; -import com.sk89q.minecraft.util.commands.annotations.Command; -import com.sk89q.minecraft.util.commands.exceptions.CommandException; +import cl.bgmp.minecraft.util.commands.CommandContext; +import cl.bgmp.minecraft.util.commands.annotations.Command; +import cl.bgmp.minecraft.util.commands.exceptions.CommandException; import fun.lewisdev.deluxehub.DeluxeHub; import fun.lewisdev.deluxehub.Permissions; import fun.lewisdev.deluxehub.config.Messages; From 8d9b70d358c6b106fd5d1065f0d28f8947834a5e Mon Sep 17 00:00:00 2001 From: Hai_tun <1346653001@qq.com> Date: Tue, 22 Dec 2020 22:53:57 +0800 Subject: [PATCH 2/2] Fix toggle flight bug --- .../fun/lewisdev/deluxehub/module/modules/player/DoubleJump.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/fun/lewisdev/deluxehub/module/modules/player/DoubleJump.java b/src/main/java/fun/lewisdev/deluxehub/module/modules/player/DoubleJump.java index 6f53b5d1..65cff74a 100644 --- a/src/main/java/fun/lewisdev/deluxehub/module/modules/player/DoubleJump.java +++ b/src/main/java/fun/lewisdev/deluxehub/module/modules/player/DoubleJump.java @@ -58,6 +58,7 @@ public void onPlayerToggleFlight(PlayerToggleFlightEvent event) { return; else if (inDisabledWorld(player.getLocation())) return; else if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR) return; + else if (!event.isFlying()) return; else if (player.getWorld().getBlockAt(player.getLocation().subtract(0, 2, 0)).getType() == Material.AIR) { event.setCancelled(true); return;