mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-10 06:28:36 +00:00
Update Upstream
9516002 Register platforms and commands in a more proper way (1766)
This commit is contained in:
@ -30,12 +30,13 @@ class BlockMapTest {
|
||||
static void setupFakePlatform() {
|
||||
when(MOCKED_PLATFORM.getRegistries()).thenReturn(new BundledRegistries() {
|
||||
});
|
||||
when(MOCKED_PLATFORM.getCapabilities()).thenReturn(ImmutableMap.of(
|
||||
Capability.WORLD_EDITING, Preference.PREFERRED,
|
||||
Capability.GAME_HOOKS, Preference.PREFERRED
|
||||
));
|
||||
when(MOCKED_PLATFORM.getCapabilities()).thenReturn(
|
||||
Stream.of(Capability.values())
|
||||
.collect(Collectors.toMap(Function.identity(), __ -> Preference.NORMAL))
|
||||
);
|
||||
PlatformManager platformManager = WorldEdit.getInstance().getPlatformManager();
|
||||
platformManager.register(MOCKED_PLATFORM);
|
||||
WorldEdit.getInstance().getEventBus().post(new PlatformsRegisteredEvent());
|
||||
|
||||
registerBlock("minecraft:air");
|
||||
registerBlock("minecraft:oak_wood");
|
||||
|
Reference in New Issue
Block a user