[Idea]: Folia support for OpenInv #196
@@ -76,6 +76,10 @@ public class SearchContainerCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clamp radius.
|
||||||
|
int configMax = plugin.getConfig().getInt("settings.command.searchcontainer.max-radius", 10);
|
||||||
|
radius = Math.max(0, Math.min(radius, configMax));
|
||||||
|
|
||||||
World world = senderPlayer.getWorld();
|
World world = senderPlayer.getWorld();
|
||||||
Chunk centerChunk = senderPlayer.getLocation().getChunk();
|
Chunk centerChunk = senderPlayer.getLocation().getChunk();
|
||||||
StringBuilder locations = new StringBuilder();
|
StringBuilder locations = new StringBuilder();
|
||||||
|
@@ -71,6 +71,7 @@ public record ConfigUpdater(OpenInv plugin) {
|
|||||||
private void updateConfig5To6() {
|
private void updateConfig5To6() {
|
||||||
plugin.getServer().getScheduler().runTask(plugin, () -> {
|
plugin.getServer().getScheduler().runTask(plugin, () -> {
|
||||||
plugin.getConfig().set("settings.command.open.no-args-opens-self", false);
|
plugin.getConfig().set("settings.command.open.no-args-opens-self", false);
|
||||||
|
plugin.getConfig().set("settings.command.searchcontainer.max-radius", 10);
|
||||||
plugin.getConfig().set("config-version", 6);
|
plugin.getConfig().set("config-version", 6);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,8 @@ settings:
|
|||||||
command:
|
command:
|
||||||
open:
|
open:
|
||||||
no-args-opens-self: false
|
no-args-opens-self: false
|
||||||
|
searchcontainer:
|
||||||
|
max-radius: 10
|
||||||
disable-offline-access: false
|
disable-offline-access: false
|
||||||
disable-saving: false
|
disable-saving: false
|
||||||
locale: 'en_us'
|
locale: 'en_us'
|
||||||
|
Reference in New Issue
Block a user