Skip to content

Commit c66743a

Browse files
committed
version bump and fix login check
1 parent 8085e8c commit c66743a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>simplexity</groupId>
88
<artifactId>SimpleFly</artifactId>
9-
<version>0.0.1</version>
9+
<version>1.0.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SimpleFly</name>

src/main/java/simplexity/simplefly/FlyListeners.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void onPlayerLogin(PlayerJoinEvent joinEvent) {
3535
return;
3636
}
3737
if (flyEnabled && !player.hasPermission(Constants.FLY_PERMISSION)) {
38-
FlyLogic.flyDisable(player);
38+
FlyLogic.disablePDC(player);
3939
}
4040
}, 10);
4141
}

src/main/java/simplexity/simplefly/FlyLogic.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public static void flyDisable(Player player){
4141
player.setFlying(false);
4242
}
4343

44+
public static void disablePDC(Player player){
45+
player.getPersistentDataContainer().set(flyStatus, PersistentDataType.BOOLEAN, false);
46+
}
47+
4448
private static boolean willFall(Player player){
4549
Location location = player.getLocation();
4650
Block blockBelow = location.clone().add(0, -1, 0).getBlock();

0 commit comments

Comments
 (0)