Skip to content

Commit

Permalink
Merge pull request ItsLewizzz#16 from Hai-tun/master
Browse files Browse the repository at this point in the history
Fix toggle flight bug
  • Loading branch information
ItsLewizzz authored Feb 3, 2021
2 parents 327b3c6 + 8d9b70d commit 69fafb9
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 50 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<artifactSet>
<includes>
<include>org.bstats:bstats-bukkit-lite</include>
<include>com.sk89q:command-framework-bukkit</include>
<include>cl.bgmp:command-framework-bukkit</include>
<include>javax.inject:javax.inject</include>
<include>de.tr7zw:item-nbt-api</include>
</includes>
Expand All @@ -63,7 +63,7 @@
<shadedPattern>fun.lewisdev.deluxehub.libs.metrics</shadedPattern>
</relocation>
<relocation>
<pattern>com.sk89q</pattern>
<pattern>cl.bgmp</pattern>
<shadedPattern>fun.lewisdev.deluxehub.libs.commandframework</shadedPattern>
</relocation>
<relocation>
Expand Down Expand Up @@ -153,9 +153,9 @@
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<groupId>cl.bgmp</groupId>
<artifactId>command-framework-bukkit</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.tr7zw</groupId>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/fun/lewisdev/deluxehub/DeluxeHub.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/fun/lewisdev/deluxehub/command/CommandManager.java
Original file line number Diff line number Diff line change
@@ -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.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69fafb9

Please sign in to comment.