#1036 Remove 'allowSpeed' option

- Option is no longer needed as the plugin user can configure how/if the speeds should be restored now
This commit is contained in:
ljacqu 2017-03-24 21:26:34 +01:00
parent 3e95d30c6b
commit 2f90a45f43
3 changed files with 1 additions and 9 deletions

View File

@ -57,8 +57,7 @@ class LimboServiceHelper {
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);
}

View File

@ -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."})

View File

@ -69,7 +69,6 @@ public class LimboServiceTest {
@Before
public void mockSettings() {
given(settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)).willReturn(false);
given(settings.getProperty(RestrictionSettings.REMOVE_SPEED)).willReturn(true);
}
@Test