X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FPreferences.java;h=ce56e8b81f9cfcb31c6c50ddb09caf3fdc603198;hb=846bb1e4e723b6a7bd260fd723bf5b4bdef0f3d0;hp=f7ecdab00b3af3bbeced98df059de24315f8392a;hpb=c5fff3247c8a680f816db28df64d6439779f5c82;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/core/Preferences.java b/src/main/java/net/pterodactylus/sone/core/Preferences.java
index f7ecdab..ce56e8b 100644
--- a/src/main/java/net/pterodactylus/sone/core/Preferences.java
+++ b/src/main/java/net/pterodactylus/sone/core/Preferences.java
@@ -1,5 +1,5 @@
/*
- * Sone - Preferences.java - Copyright © 2013 David Roden
+ * Sone - Preferences.java - Copyright © 2013â2016 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -39,8 +39,6 @@ import com.google.common.eventbus.EventBus;
/**
* Convenience interface for external classes that want to access the coreâs
* configuration.
- *
- * @author David âBombeâ Roden
*/
public class Preferences {
@@ -55,8 +53,7 @@ public class Preferences {
new DefaultOption(400, Predicates.or(
range(50, MAX_VALUE), equalTo(-1)));
private final Option postCutOffLength =
- new DefaultOption(200, Predicates.or(
- range(50, MAX_VALUE), equalTo(-1)));
+ new DefaultOption(200, range(50, MAX_VALUE));
private final Option requireFullAccess =
new DefaultOption(false);
private final Option positiveTrust =
@@ -106,6 +103,7 @@ public class Preferences {
public Preferences setInsertionDelay(Integer insertionDelay) {
this.insertionDelay.set(insertionDelay);
eventBus.post(new InsertionDelayChangedEvent(getInsertionDelay()));
+ eventBus.post(new PreferenceChangedEvent("InsertionDelay", getInsertionDelay()));
return this;
}