Skip to content

Commit

Permalink
#1036 Remove 'allowSpeed' option
Browse files Browse the repository at this point in the history
- Option is no longer needed as the plugin user can configure how/if the speeds should be restored now
  • Loading branch information
ljacqu committed Mar 24, 2017
1 parent 3e95d30 commit 2f90a45
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ void revokeLimboStates(Player player) {
player.setOp(false);
player.setAllowFlight(false);

if (!settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)
&& settings.getProperty(RestrictionSettings.REMOVE_SPEED)) {
if (!settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)) {
player.setFlySpeed(0.0f);
player.setWalkSpeed(0.0f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ public final class RestrictionSettings implements SettingsHolder {
public static final Property<Boolean> ALLOW_UNAUTHED_MOVEMENT =
newProperty("settings.restrictions.allowMovement", false);

@Comment({
"Should not authenticated players have speed = 0?",
"This will reset the fly/walk speed to default value after the login."})
public static final Property<Boolean> REMOVE_SPEED =
newProperty("settings.restrictions.removeSpeed", true);

@Comment({
"After how many seconds should players who fail to login or register",
"be kicked? Set to 0 to disable."})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public static void initLogger() {
@Before
public void mockSettings() {
given(settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)).willReturn(false);
given(settings.getProperty(RestrictionSettings.REMOVE_SPEED)).willReturn(true);
}

@Test
Expand Down

0 comments on commit 2f90a45

Please sign in to comment.