mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 21:56:45 +01:00
feature: ability to disable impromtu Mojang uuid API calls
This commit is contained in:
parent
a7b3b3b7df
commit
b59b98c11a
@ -513,8 +513,10 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
this.backgroundPipeline.registerService(essentialsUUIDService);
|
this.backgroundPipeline.registerService(essentialsUUIDService);
|
||||||
}
|
}
|
||||||
|
|
||||||
final SquirrelIdUUIDService impromptuMojangService = new SquirrelIdUUIDService(Settings.UUID.IMPROMPTU_LIMIT);
|
if (Settings.UUID.IMPROMPTU_SERVICE_MOJANG_API) {
|
||||||
this.impromptuPipeline.registerService(impromptuMojangService);
|
final SquirrelIdUUIDService impromptuMojangService = new SquirrelIdUUIDService(Settings.UUID.IMPROMPTU_LIMIT);
|
||||||
|
this.impromptuPipeline.registerService(impromptuMojangService);
|
||||||
|
}
|
||||||
final SquirrelIdUUIDService backgroundMojangService = new SquirrelIdUUIDService(Settings.UUID.BACKGROUND_LIMIT);
|
final SquirrelIdUUIDService backgroundMojangService = new SquirrelIdUUIDService(Settings.UUID.BACKGROUND_LIMIT);
|
||||||
this.backgroundPipeline.registerService(backgroundMojangService);
|
this.backgroundPipeline.registerService(backgroundMojangService);
|
||||||
} else {
|
} else {
|
||||||
|
@ -249,6 +249,8 @@ public class Settings extends Config {
|
|||||||
public static int UUID_CACHE_SIZE = 100000;
|
public static int UUID_CACHE_SIZE = 100000;
|
||||||
@Comment("Rate limit (per 10 minutes) for background UUID fetching from the Mojang API")
|
@Comment("Rate limit (per 10 minutes) for background UUID fetching from the Mojang API")
|
||||||
public static int BACKGROUND_LIMIT = 200;
|
public static int BACKGROUND_LIMIT = 200;
|
||||||
|
@Comment("Whether the Mojang API service is enabled for inpromto (requires restart)")
|
||||||
|
public static boolean IMPROMPTU_SERVICE_MOJANG_API = true;
|
||||||
@Comment("Rate limit (per 10 minutes) for random UUID fetching from the Mojang API")
|
@Comment("Rate limit (per 10 minutes) for random UUID fetching from the Mojang API")
|
||||||
public static int IMPROMPTU_LIMIT = 300;
|
public static int IMPROMPTU_LIMIT = 300;
|
||||||
@Comment("Timeout (in milliseconds) for non-blocking UUID requests (mostly commands)")
|
@Comment("Timeout (in milliseconds) for non-blocking UUID requests (mostly commands)")
|
||||||
|
Loading…
Reference in New Issue
Block a user