Search in sources :

Example 31 with LocalConfiguration

use of com.sk89q.worldedit.LocalConfiguration in project FastAsyncWorldEdit by IntellectualSites.

the class BaseExpressionTest method setup.

@BeforeEach
void setup() {
    when(mockPlat.getCapabilities()).thenReturn(Stream.of(Capability.values()).collect(Collectors.toMap(Function.identity(), __ -> Preference.NORMAL)));
    when(mockPlat.getConfiguration()).thenReturn(new LocalConfiguration() {

        @Override
        public void load() {
        }
    });
    WorldEdit.getInstance().getPlatformManager().register(mockPlat);
    WorldEdit.getInstance().getEventBus().post(new PlatformsRegisteredEvent());
    WorldEdit.getInstance().getConfiguration().calculationTimeout = 1_000;
}
Also used : PlatformsRegisteredEvent(com.sk89q.worldedit.event.platform.PlatformsRegisteredEvent) LocalConfiguration(com.sk89q.worldedit.LocalConfiguration) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

LocalConfiguration (com.sk89q.worldedit.LocalConfiguration)31 CommandPermissions (com.sk89q.worldedit.command.util.CommandPermissions)20 Command (org.enginehub.piston.annotation.Command)20 File (java.io.File)12 IOException (java.io.IOException)9 URI (java.net.URI)7 URIClipboardHolder (com.fastasyncworldedit.core.extent.clipboard.URIClipboardHolder)6 Snapshot (com.sk89q.worldedit.world.snapshot.Snapshot)6 Snapshot (com.sk89q.worldedit.world.snapshot.experimental.Snapshot)6 MissingWorldException (com.sk89q.worldedit.world.storage.MissingWorldException)6 MultiClipboardHolder (com.fastasyncworldedit.core.extent.clipboard.MultiClipboardHolder)5 ClipboardHolder (com.sk89q.worldedit.session.ClipboardHolder)4 Logging (com.sk89q.worldedit.command.util.Logging)3 ClipboardFormat (com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat)3 Component (com.sk89q.worldedit.util.formatting.text.Component)3 TextComponent (com.sk89q.worldedit.util.formatting.text.TextComponent)3 TranslatableComponent (com.sk89q.worldedit.util.formatting.text.TranslatableComponent)3 Region (com.sk89q.worldedit.regions.Region)2 InvalidSnapshotException (com.sk89q.worldedit.world.snapshot.InvalidSnapshotException)2 URL (java.net.URL)2