#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:
parent
3e95d30c6b
commit
2f90a45f43
@ -57,8 +57,7 @@ class LimboServiceHelper {
|
|||||||
player.setOp(false);
|
player.setOp(false);
|
||||||
player.setAllowFlight(false);
|
player.setAllowFlight(false);
|
||||||
|
|
||||||
if (!settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)
|
if (!settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)) {
|
||||||
&& settings.getProperty(RestrictionSettings.REMOVE_SPEED)) {
|
|
||||||
player.setFlySpeed(0.0f);
|
player.setFlySpeed(0.0f);
|
||||||
player.setWalkSpeed(0.0f);
|
player.setWalkSpeed(0.0f);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,12 +107,6 @@ public final class RestrictionSettings implements SettingsHolder {
|
|||||||
public static final Property<Boolean> ALLOW_UNAUTHED_MOVEMENT =
|
public static final Property<Boolean> ALLOW_UNAUTHED_MOVEMENT =
|
||||||
newProperty("settings.restrictions.allowMovement", false);
|
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({
|
@Comment({
|
||||||
"After how many seconds should players who fail to login or register",
|
"After how many seconds should players who fail to login or register",
|
||||||
"be kicked? Set to 0 to disable."})
|
"be kicked? Set to 0 to disable."})
|
||||||
|
|||||||
@ -69,7 +69,6 @@ public class LimboServiceTest {
|
|||||||
@Before
|
@Before
|
||||||
public void mockSettings() {
|
public void mockSettings() {
|
||||||
given(settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)).willReturn(false);
|
given(settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)).willReturn(false);
|
||||||
given(settings.getProperty(RestrictionSettings.REMOVE_SPEED)).willReturn(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user