mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-19 00:35:20 +01:00
Merge pull request #82 from games647/speedrestore
Restore walk and flight speed (Fixes Xephi/AuthMeReloaded#356)
This commit is contained in:
commit
ec47371dcb
@ -98,6 +98,13 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void restoreSpeedEffects() {
|
||||||
|
if (Settings.isRemoveSpeedEnabled) {
|
||||||
|
player.setWalkSpeed(0.2F);
|
||||||
|
player.setFlySpeed(0.1F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void restoreInventory() {
|
protected void restoreInventory() {
|
||||||
RestoreInventoryEvent event = new RestoreInventoryEvent(player);
|
RestoreInventoryEvent event = new RestoreInventoryEvent(player);
|
||||||
pm.callEvent(event);
|
pm.callEvent(event);
|
||||||
@ -133,7 +140,6 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
|||||||
public void run() {
|
public void run() {
|
||||||
// Limbo contains the State of the Player before /login
|
// Limbo contains the State of the Player before /login
|
||||||
if (limbo != null) {
|
if (limbo != null) {
|
||||||
|
|
||||||
// Restore Op state and Permission Group
|
// Restore Op state and Permission Group
|
||||||
restoreOpState();
|
restoreOpState();
|
||||||
Utils.setGroup(player, GroupType.LOGGEDIN);
|
Utils.setGroup(player, GroupType.LOGGEDIN);
|
||||||
@ -161,7 +167,6 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
restoreFlyghtState();
|
restoreFlyghtState();
|
||||||
|
|
||||||
if (Settings.protectInventoryBeforeLogInEnabled) {
|
if (Settings.protectInventoryBeforeLogInEnabled) {
|
||||||
restoreInventory();
|
restoreInventory();
|
||||||
}
|
}
|
||||||
@ -185,6 +190,7 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
|||||||
AuthMePlayerListener.joinMessage.remove(name);
|
AuthMePlayerListener.joinMessage.remove(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restoreSpeedEffects();
|
||||||
if (Settings.applyBlindEffect) {
|
if (Settings.applyBlindEffect) {
|
||||||
player.removePotionEffect(PotionEffectType.BLINDNESS);
|
player.removePotionEffect(PotionEffectType.BLINDNESS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user