├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── CODEOWNERS ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── codecov.yml └── workflows │ ├── gradle.yml │ └── stale.yml ├── .gitignore ├── CHANGELOG.txt ├── COMPILING.md ├── CONTRIBUTING.md ├── HEADER.txt ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── build-logic ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ └── kotlin │ ├── buildlogic.adapter.gradle.kts │ ├── buildlogic.artifactory-root.gradle.kts │ ├── buildlogic.artifactory-sub.gradle.kts │ ├── buildlogic.common-java.gradle.kts │ ├── buildlogic.common.gradle.kts │ ├── buildlogic.core-and-platform.gradle.kts │ ├── buildlogic.libs.gradle.kts │ ├── buildlogic.platform.gradle.kts │ ├── buildlogic │ ├── GradleExtras.kt │ └── PlatformExtension.kt │ ├── japicmp │ └── accept │ │ ├── AbstractAcceptingRule.kt │ │ ├── AcceptedRegressionsRulePostProcess.kt │ │ ├── AcceptingSetupRule.kt │ │ ├── BinaryCompatRule.kt │ │ ├── ChangeParams.kt │ │ ├── LICENSE.md │ │ ├── apichanges.kt │ │ └── userdata.kt │ └── repositoriesHelper.kt ├── build.gradle.kts ├── config └── checkstyle │ ├── checkstyle-suppression.xml │ └── checkstyle.xml ├── contrib └── craftscripts │ ├── README.md │ ├── SUBMITTING.md │ ├── draw.js │ ├── maze.js │ ├── quickshot.js │ └── roof.js ├── crowdin-distributor.sh ├── gradle.properties ├── gradle ├── gradle-daemon-jvm.properties ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts ├── verification ├── build.gradle.kts └── src │ └── changes │ ├── accepted-bukkit-public-api-changes.json │ ├── accepted-cli-public-api-changes.json │ ├── accepted-core-public-api-changes.json │ ├── accepted-fabric-public-api-changes.json │ ├── accepted-neoforge-public-api-changes.json │ └── accepted-sponge-public-api-changes.json ├── worldedit-bukkit ├── adapters │ ├── adapter-1.21.3 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── sk89q │ │ │ └── worldedit │ │ │ └── bukkit │ │ │ └── adapter │ │ │ └── impl │ │ │ └── v1_21_3 │ │ │ ├── PaperweightAdapter.java │ │ │ ├── PaperweightDataConverters.java │ │ │ ├── PaperweightFakePlayer.java │ │ │ ├── PaperweightServerLevelDelegateProxy.java │ │ │ ├── PaperweightWorldNativeAccess.java │ │ │ └── StaticRefraction.java │ ├── adapter-1.21.4 │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── sk89q │ │ │ └── worldedit │ │ │ └── bukkit │ │ │ └── adapter │ │ │ └── impl │ │ │ └── v1_21_4 │ │ │ ├── PaperweightAdapter.java │ │ │ ├── PaperweightDataConverters.java │ │ │ ├── PaperweightFakePlayer.java │ │ │ ├── PaperweightServerLevelDelegateProxy.java │ │ │ ├── PaperweightWorldNativeAccess.java │ │ │ └── StaticRefraction.java │ └── adapter-1.21.5 │ │ ├── build.gradle.kts │ │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── sk89q │ │ └── worldedit │ │ └── bukkit │ │ └── adapter │ │ └── impl │ │ └── v1_21_5 │ │ ├── PaperweightAdapter.java │ │ ├── PaperweightDataConverters.java │ │ ├── PaperweightFakePlayer.java │ │ ├── PaperweightServerLevelDelegateProxy.java │ │ ├── PaperweightWorldNativeAccess.java │ │ └── StaticRefraction.java ├── build.gradle.kts └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── sk89q │ │ │ ├── bukkit │ │ │ └── util │ │ │ │ ├── ClassSourceValidator.java │ │ │ │ ├── CommandInfo.java │ │ │ │ ├── CommandInspector.java │ │ │ │ ├── CommandRegistration.java │ │ │ │ ├── CommandsManagerRegistration.java │ │ │ │ ├── DynamicPluginCommand.java │ │ │ │ ├── DynamicPluginCommandHelpTopic.java │ │ │ │ └── FallbackRegistrationListener.java │ │ │ ├── wepif │ │ │ ├── ConfigurationPermissionsResolver.java │ │ │ ├── DinnerPermsResolver.java │ │ │ ├── FlatFilePermissionsResolver.java │ │ │ ├── GroupManagerResolver.java │ │ │ ├── NijiPermissionsResolver.java │ │ │ ├── PermissionsExResolver.java │ │ │ ├── PermissionsProvider.java │ │ │ ├── PermissionsResolver.java │ │ │ ├── PermissionsResolverManager.java │ │ │ ├── PluginPermissionsResolver.java │ │ │ ├── VaultResolver.java │ │ │ ├── WEPIFRuntimeException.java │ │ │ └── bPermissionsResolver.java │ │ │ └── worldedit │ │ │ ├── bukkit │ │ │ ├── BukkitAdapter.java │ │ │ ├── BukkitBiomeRegistry.java │ │ │ ├── BukkitBlockCategoryRegistry.java │ │ │ ├── BukkitBlockCommandSender.java │ │ │ ├── BukkitBlockRegistry.java │ │ │ ├── BukkitCommandInspector.java │ │ │ ├── BukkitCommandSender.java │ │ │ ├── BukkitConfiguration.java │ │ │ ├── BukkitEntity.java │ │ │ ├── BukkitEntityProperties.java │ │ │ ├── BukkitItemCategoryRegistry.java │ │ │ ├── BukkitItemRegistry.java │ │ │ ├── BukkitPlayer.java │ │ │ ├── BukkitPlayerBlockBag.java │ │ │ ├── BukkitRegistries.java │ │ │ ├── BukkitServerInterface.java │ │ │ ├── BukkitWatchdog.java │ │ │ ├── BukkitWorld.java │ │ │ ├── CUIChannelListener.java │ │ │ ├── EditSessionBlockChangeDelegate.java │ │ │ ├── WorldEditListener.java │ │ │ ├── WorldEditPlugin.java │ │ │ └── adapter │ │ │ │ ├── AdapterLoadException.java │ │ │ │ ├── BukkitImplAdapter.java │ │ │ │ ├── BukkitImplLoader.java │ │ │ │ ├── Refraction.java │ │ │ │ └── UnsupportedVersionEditException.java │ │ │ └── util │ │ │ └── formatting │ │ │ └── text │ │ │ └── adapter │ │ │ └── bukkit │ │ │ └── SpigotAdapter.java │ └── resources │ │ ├── defaults │ │ └── config.yml │ │ └── plugin.yml │ └── test │ └── java │ └── com │ └── sk89q │ ├── wepif │ ├── DinnerPermsResolverTest.java │ └── TestOfflinePermissible.java │ └── worldedit │ └── bukkit │ └── BukkitWorldTest.java ├── worldedit-cli ├── build.gradle.kts └── src │ └── main │ ├── java │ └── com │ │ └── sk89q │ │ └── worldedit │ │ └── cli │ │ ├── CLIBlockCategoryRegistry.java │ │ ├── CLIBlockRegistry.java │ │ ├── CLICommandSender.java │ │ ├── CLIConfiguration.java │ │ ├── CLIExtraCommands.java │ │ ├── CLIItemCategoryRegistry.java │ │ ├── CLIPlatform.java │ │ ├── CLIRegistries.java │ │ ├── CLIWorld.java │ │ ├── CLIWorldEdit.java │ │ ├── data │ │ └── FileRegistries.java │ │ └── schematic │ │ └── ClipboardWorld.java │ └── resources │ ├── com │ └── sk89q │ │ └── worldedit │ │ └── cli │ │ └── data │ │ ├── 1631.json │ │ ├── 1963.json │ │ ├── 1968.json │ │ ├── 1976.json │ │ ├── 2225.json │ │ ├── 2230.json │ │ ├── 2567.json │ │ ├── 2578.json │ │ ├── 2724.json │ │ └── 3105.json │ ├── defaults │ └── worldedit.properties │ └── log4j2.xml ├── worldedit-core ├── build.gradle.kts ├── doctools │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── com │ │ └── sk89q │ │ └── worldedit │ │ └── internal │ │ └── util │ │ ├── DocumentationConfiguration.kt │ │ ├── DocumentationPlatform.kt │ │ ├── DocumentationPrinter.kt │ │ └── RstWorldEditText.kt └── src │ ├── legacy │ └── java │ │ └── com │ │ └── sk89q │ │ └── worldedit │ │ └── blocks │ │ ├── LegacyBaseBlockWrapper.java │ │ ├── MobSpawnerBlock.java │ │ ├── SignBlock.java │ │ └── SkullBlock.java │ ├── main │ ├── antlr │ │ └── com │ │ │ └── sk89q │ │ │ └── worldedit │ │ │ └── antlr │ │ │ └── Expression.g4 │ ├── java │ │ └── com │ │ │ └── sk89q │ │ │ ├── jnbt │ │ │ ├── ByteArrayTag.java │ │ │ ├── ByteTag.java │ │ │ ├── CompoundTag.java │ │ │ ├── CompoundTagBuilder.java │ │ │ ├── DoubleTag.java │ │ │ ├── EndTag.java │ │ │ ├── FloatTag.java │ │ │ ├── IntArrayTag.java │ │ │ ├── IntTag.java │ │ │ ├── LinBusConverter.java │ │ │ ├── ListTag.java │ │ │ ├── ListTagBuilder.java │ │ │ ├── LongArrayTag.java │ │ │ ├── LongTag.java │ │ │ ├── NBTConstants.java │ │ │ ├── NBTInputStream.java │ │ │ ├── NBTOutputStream.java │ │ │ ├── NBTUtils.java │ │ │ ├── NamedTag.java │ │ │ ├── ShortTag.java │ │ │ ├── StringTag.java │ │ │ └── Tag.java │ │ │ ├── minecraft │ │ │ └── util │ │ │ │ └── commands │ │ │ │ ├── Command.java │ │ │ │ ├── CommandAlias.java │ │ │ │ ├── CommandContext.java │ │ │ │ ├── CommandException.java │ │ │ │ ├── CommandLocals.java │ │ │ │ ├── CommandPermissions.java │ │ │ │ ├── CommandPermissionsException.java │ │ │ │ ├── CommandUsageException.java │ │ │ │ ├── CommandsManager.java │ │ │ │ ├── Console.java │ │ │ │ ├── Injector.java │ │ │ │ ├── MissingNestedCommandException.java │ │ │ │ ├── NestedCommand.java │ │ │ │ ├── SimpleInjector.java │ │ │ │ ├── SuggestionContext.java │ │ │ │ ├── UnhandledCommandException.java │ │ │ │ ├── WrappedCommandException.java │ │ │ │ └── package-info.java │ │ │ ├── util │ │ │ ├── ReflectionUtil.java │ │ │ ├── StringUtil.java │ │ │ └── yaml │ │ │ │ ├── YAMLFormat.java │ │ │ │ ├── YAMLNode.java │ │ │ │ ├── YAMLProcessor.java │ │ │ │ └── YAMLProcessorException.java │ │ │ └── worldedit │ │ │ ├── DisallowedItemException.java │ │ │ ├── EditSession.java │ │ │ ├── EditSessionBuilder.java │ │ │ ├── EditSessionFactory.java │ │ │ ├── EmptyClipboardException.java │ │ │ ├── IncompleteRegionException.java │ │ │ ├── InvalidItemException.java │ │ │ ├── LocalConfiguration.java │ │ │ ├── LocalSession.java │ │ │ ├── MaxBrushRadiusException.java │ │ │ ├── MaxChangedBlocksException.java │ │ │ ├── MaxRadiusException.java │ │ │ ├── MissingWorldException.java │ │ │ ├── NotABlockException.java │ │ │ ├── TracedEditSession.java │ │ │ ├── UnknownDirectionException.java │ │ │ ├── UnknownItemException.java │ │ │ ├── WorldEdit.java │ │ │ ├── WorldEditException.java │ │ │ ├── WorldEditManifest.java │ │ │ ├── blocks │ │ │ ├── BaseItem.java │ │ │ ├── BaseItemStack.java │ │ │ ├── Blocks.java │ │ │ └── TileEntityBlock.java │ │ │ ├── command │ │ │ ├── ApplyBrushCommands.java │ │ │ ├── BiomeCommands.java │ │ │ ├── BrushCommands.java │ │ │ ├── ChunkCommands.java │ │ │ ├── ClipboardCommands.java │ │ │ ├── ExpandCommands.java │ │ │ ├── GeneralCommands.java │ │ │ ├── GenerationCommands.java │ │ │ ├── HistoryCommands.java │ │ │ ├── InsufficientArgumentsException.java │ │ │ ├── LegacySnapshotCommands.java │ │ │ ├── LegacySnapshotUtilCommands.java │ │ │ ├── NavigationCommands.java │ │ │ ├── PaintBrushCommands.java │ │ │ ├── RegionCommands.java │ │ │ ├── SchematicCommands.java │ │ │ ├── ScriptingCommands.java │ │ │ ├── SelectionCommands.java │ │ │ ├── SnapshotCommands.java │ │ │ ├── SnapshotUtilCommands.java │ │ │ ├── SuperPickaxeCommands.java │ │ │ ├── ToolCommands.java │ │ │ ├── ToolUtilCommands.java │ │ │ ├── UtilityCommands.java │ │ │ ├── WorldEditCommands.java │ │ │ ├── argument │ │ │ │ ├── AbstractDirectionConverter.java │ │ │ │ ├── Arguments.java │ │ │ │ ├── BooleanConverter.java │ │ │ │ ├── Chunk3dVectorConverter.java │ │ │ │ ├── ClipboardFormatConverter.java │ │ │ │ ├── ClipboardShareDestinationConverter.java │ │ │ │ ├── CommaSeparatedValuesConverter.java │ │ │ │ ├── DirectionConverter.java │ │ │ │ ├── DirectionVectorConverter.java │ │ │ │ ├── EntityRemoverConverter.java │ │ │ │ ├── EnumConverter.java │ │ │ │ ├── FactoryConverter.java │ │ │ │ ├── HeightConverter.java │ │ │ │ ├── OffsetConverter.java │ │ │ │ ├── RegionFactoryConverter.java │ │ │ │ ├── RegistryConverter.java │ │ │ │ ├── SelectorChoice.java │ │ │ │ ├── SelectorChoiceConverter.java │ │ │ │ ├── SelectorChoiceList.java │ │ │ │ ├── SelectorChoiceOrList.java │ │ │ │ ├── SideEffectConverter.java │ │ │ │ ├── SideEffectSetConverter.java │ │ │ │ ├── VectorConverter.java │ │ │ │ ├── WorldConverter.java │ │ │ │ ├── ZonedDateTimeConverter.java │ │ │ │ └── package-info.java │ │ │ ├── factory │ │ │ │ ├── FeatureGeneratorFactory.java │ │ │ │ ├── ItemUseFactory.java │ │ │ │ ├── ReplaceFactory.java │ │ │ │ └── TreeGeneratorFactory.java │ │ │ ├── tool │ │ │ │ ├── AreaPickaxe.java │ │ │ │ ├── BlockDataCyler.java │ │ │ │ ├── BlockReplacer.java │ │ │ │ ├── BlockTool.java │ │ │ │ ├── BrushTool.java │ │ │ │ ├── DistanceWand.java │ │ │ │ ├── DoubleActionBlockTool.java │ │ │ │ ├── DoubleActionTraceTool.java │ │ │ │ ├── FloatingTreeRemover.java │ │ │ │ ├── FloodFillTool.java │ │ │ │ ├── InvalidToolBindException.java │ │ │ │ ├── LongRangeBuildTool.java │ │ │ │ ├── NavigationWand.java │ │ │ │ ├── QueryTool.java │ │ │ │ ├── RecursivePickaxe.java │ │ │ │ ├── SelectionWand.java │ │ │ │ ├── SinglePickaxe.java │ │ │ │ ├── StackTool.java │ │ │ │ ├── Tool.java │ │ │ │ ├── TraceTool.java │ │ │ │ ├── TreePlanter.java │ │ │ │ └── brush │ │ │ │ │ ├── Brush.java │ │ │ │ │ ├── ButcherBrush.java │ │ │ │ │ ├── ClipboardBrush.java │ │ │ │ │ ├── CylinderBrush.java │ │ │ │ │ ├── GravityBrush.java │ │ │ │ │ ├── HollowCylinderBrush.java │ │ │ │ │ ├── HollowSphereBrush.java │ │ │ │ │ ├── ImageHeightmapBrush.java │ │ │ │ │ ├── MorphBrush.java │ │ │ │ │ ├── OperationFactoryBrush.java │ │ │ │ │ ├── SmoothBrush.java │ │ │ │ │ ├── SnowSmoothBrush.java │ │ │ │ │ ├── SphereBrush.java │ │ │ │ │ └── SplatterBrush.java │ │ │ └── util │ │ │ │ ├── AsyncCommandBuilder.java │ │ │ │ ├── CommandPermissions.java │ │ │ │ ├── CommandPermissionsConditionGenerator.java │ │ │ │ ├── CreatureButcher.java │ │ │ │ ├── EntityRemover.java │ │ │ │ ├── FutureProgressListener.java │ │ │ │ ├── HookMode.java │ │ │ │ ├── Logging.java │ │ │ │ ├── MessageTimerTask.java │ │ │ │ ├── PermissionCondition.java │ │ │ │ ├── PrintCommandHelp.java │ │ │ │ ├── SubCommandPermissionCondition.java │ │ │ │ ├── SuggestionHelper.java │ │ │ │ └── WorldEditAsyncCommandBuilder.java │ │ │ ├── entity │ │ │ ├── BaseEntity.java │ │ │ ├── Entity.java │ │ │ ├── Player.java │ │ │ └── metadata │ │ │ │ └── EntityProperties.java │ │ │ ├── event │ │ │ ├── AbstractCancellable.java │ │ │ ├── Cancellable.java │ │ │ ├── Event.java │ │ │ ├── extent │ │ │ │ └── EditSessionEvent.java │ │ │ └── platform │ │ │ │ ├── BlockInteractEvent.java │ │ │ │ ├── CommandEvent.java │ │ │ │ ├── CommandSuggestionEvent.java │ │ │ │ ├── ConfigurationLoadEvent.java │ │ │ │ ├── InputType.java │ │ │ │ ├── Interaction.java │ │ │ │ ├── PlatformEvent.java │ │ │ │ ├── PlatformInitializeEvent.java │ │ │ │ ├── PlatformReadyEvent.java │ │ │ │ ├── PlatformUnreadyEvent.java │ │ │ │ ├── PlatformsRegisteredEvent.java │ │ │ │ ├── PlayerInputEvent.java │ │ │ │ └── SessionIdleEvent.java │ │ │ ├── extension │ │ │ ├── factory │ │ │ │ ├── BlockFactory.java │ │ │ │ ├── ItemFactory.java │ │ │ │ ├── MaskFactory.java │ │ │ │ ├── PatternFactory.java │ │ │ │ └── parser │ │ │ │ │ ├── DefaultBlockParser.java │ │ │ │ │ ├── DefaultItemParser.java │ │ │ │ │ ├── mask │ │ │ │ │ ├── AirMaskParser.java │ │ │ │ │ ├── BiomeMaskParser.java │ │ │ │ │ ├── BlockCategoryMaskParser.java │ │ │ │ │ ├── BlockStateMaskParser.java │ │ │ │ │ ├── BlocksMaskParser.java │ │ │ │ │ ├── ExistingMaskParser.java │ │ │ │ │ ├── ExposedMaskParser.java │ │ │ │ │ ├── ExpressionMaskParser.java │ │ │ │ │ ├── LazyRegionMaskParser.java │ │ │ │ │ ├── NegateMaskParser.java │ │ │ │ │ ├── NoiseMaskParser.java │ │ │ │ │ ├── OffsetMaskParser.java │ │ │ │ │ ├── RegionMaskParser.java │ │ │ │ │ └── SolidMaskParser.java │ │ │ │ │ └── pattern │ │ │ │ │ ├── BlockCategoryPatternParser.java │ │ │ │ │ ├── ClipboardPatternParser.java │ │ │ │ │ ├── RandomPatternParser.java │ │ │ │ │ ├── RandomStatePatternParser.java │ │ │ │ │ ├── SingleBlockPatternParser.java │ │ │ │ │ └── TypeOrStateApplyingPatternParser.java │ │ │ ├── input │ │ │ │ ├── DisallowedUsageException.java │ │ │ │ ├── InputParseException.java │ │ │ │ ├── NoMatchException.java │ │ │ │ └── ParserContext.java │ │ │ └── platform │ │ │ │ ├── AbstractCommandBlockActor.java │ │ │ │ ├── AbstractNonPlayerActor.java │ │ │ │ ├── AbstractPlatform.java │ │ │ │ ├── AbstractPlayerActor.java │ │ │ │ ├── Actor.java │ │ │ │ ├── Annotations.java │ │ │ │ ├── Capability.java │ │ │ │ ├── Locatable.java │ │ │ │ ├── MultiUserPlatform.java │ │ │ │ ├── NoCapablePlatformException.java │ │ │ │ ├── Platform.java │ │ │ │ ├── PlatformCommandManager.java │ │ │ │ ├── PlatformManager.java │ │ │ │ ├── PlayerProxy.java │ │ │ │ ├── Preference.java │ │ │ │ ├── Watchdog.java │ │ │ │ └── permission │ │ │ │ ├── ActorSelectorLimits.java │ │ │ │ └── OverridePermissions.java │ │ │ ├── extent │ │ │ ├── AbstractBufferingExtent.java │ │ │ ├── AbstractDelegateExtent.java │ │ │ ├── ChangeSetExtent.java │ │ │ ├── Extent.java │ │ │ ├── InputExtent.java │ │ │ ├── MaskingExtent.java │ │ │ ├── NullExtent.java │ │ │ ├── OutputExtent.java │ │ │ ├── TracingExtent.java │ │ │ ├── buffer │ │ │ │ ├── ExtentBuffer.java │ │ │ │ ├── ForgetfulExtentBuffer.java │ │ │ │ └── internal │ │ │ │ │ └── BatchingExtent.java │ │ │ ├── cache │ │ │ │ └── LastAccessExtentCache.java │ │ │ ├── clipboard │ │ │ │ ├── BlockArrayClipboard.java │ │ │ │ ├── Clipboard.java │ │ │ │ ├── StoredEntity.java │ │ │ │ └── io │ │ │ │ │ ├── BuiltInClipboardFormat.java │ │ │ │ │ ├── ClipboardFormat.java │ │ │ │ │ ├── ClipboardFormats.java │ │ │ │ │ ├── ClipboardReader.java │ │ │ │ │ ├── ClipboardWriter.java │ │ │ │ │ ├── MCEditSchematicReader.java │ │ │ │ │ ├── NBTSchematicReader.java │ │ │ │ │ ├── SchematicLoadException.java │ │ │ │ │ ├── SpongeSchematicReader.java │ │ │ │ │ ├── SpongeSchematicWriter.java │ │ │ │ │ ├── legacycompat │ │ │ │ │ ├── BannerBlockCompatibilityHandler.java │ │ │ │ │ ├── BedBlockCompatibilityHandler.java │ │ │ │ │ ├── EntityNBTCompatibilityHandler.java │ │ │ │ │ ├── FlowerPotCompatibilityHandler.java │ │ │ │ │ ├── NBTCompatibilityHandler.java │ │ │ │ │ ├── NoteBlockCompatibilityHandler.java │ │ │ │ │ ├── Pre13HangingCompatibilityHandler.java │ │ │ │ │ ├── SignCompatibilityHandler.java │ │ │ │ │ └── SkullBlockCompatibilityHandler.java │ │ │ │ │ ├── share │ │ │ │ │ ├── BuiltInClipboardShareDestinations.java │ │ │ │ │ ├── ClipboardShareDestination.java │ │ │ │ │ ├── ClipboardShareDestinations.java │ │ │ │ │ ├── ClipboardShareMetadata.java │ │ │ │ │ └── ShareOutputProvider.java │ │ │ │ │ └── sponge │ │ │ │ │ ├── ReaderUtil.java │ │ │ │ │ ├── SpongeSchematicV1Reader.java │ │ │ │ │ ├── SpongeSchematicV2Reader.java │ │ │ │ │ ├── SpongeSchematicV2Writer.java │ │ │ │ │ ├── SpongeSchematicV3Reader.java │ │ │ │ │ ├── SpongeSchematicV3Writer.java │ │ │ │ │ ├── VersionedDataFixer.java │ │ │ │ │ ├── WriterUtil.java │ │ │ │ │ └── package-info.java │ │ │ ├── inventory │ │ │ │ ├── BlockBag.java │ │ │ │ ├── BlockBagException.java │ │ │ │ ├── BlockBagExtent.java │ │ │ │ ├── OutOfBlocksException.java │ │ │ │ ├── OutOfSpaceException.java │ │ │ │ └── UnplaceableBlockException.java │ │ │ ├── reorder │ │ │ │ ├── ChunkBatchingExtent.java │ │ │ │ ├── MultiStageReorder.java │ │ │ │ └── ReorderingExtent.java │ │ │ ├── transform │ │ │ │ └── BlockTransformExtent.java │ │ │ ├── validation │ │ │ │ ├── BlockChangeLimiter.java │ │ │ │ └── DataValidatorExtent.java │ │ │ └── world │ │ │ │ ├── BiomeQuirkExtent.java │ │ │ │ ├── BlockQuirkExtent.java │ │ │ │ ├── ChunkLoadingExtent.java │ │ │ │ ├── SideEffectExtent.java │ │ │ │ ├── SurvivalModeExtent.java │ │ │ │ └── WatchdogTickingExtent.java │ │ │ ├── function │ │ │ ├── CombinedRegionFunction.java │ │ │ ├── Contextual.java │ │ │ ├── EditContext.java │ │ │ ├── EntityFunction.java │ │ │ ├── FlatRegionFunction.java │ │ │ ├── FlatRegionMaskingFilter.java │ │ │ ├── GroundFunction.java │ │ │ ├── ItemUseFunction.java │ │ │ ├── LayerFunction.java │ │ │ ├── RegionFunction.java │ │ │ ├── RegionMaskingFilter.java │ │ │ ├── biome │ │ │ │ ├── BiomeReplace.java │ │ │ │ └── ExtentBiomeCopy.java │ │ │ ├── block │ │ │ │ ├── ApplySideEffect.java │ │ │ │ ├── BlockDistributionCounter.java │ │ │ │ ├── BlockReplace.java │ │ │ │ ├── Counter.java │ │ │ │ ├── ExtentBlockCopy.java │ │ │ │ ├── Naturalizer.java │ │ │ │ └── SnowSimulator.java │ │ │ ├── entity │ │ │ │ └── ExtentEntityCopy.java │ │ │ ├── factory │ │ │ │ ├── Apply.java │ │ │ │ ├── ApplyLayer.java │ │ │ │ ├── ApplyRegion.java │ │ │ │ ├── BiomeFactory.java │ │ │ │ ├── Deform.java │ │ │ │ ├── Paint.java │ │ │ │ └── Snow.java │ │ │ ├── generator │ │ │ │ ├── FeatureGenerator.java │ │ │ │ ├── FloraGenerator.java │ │ │ │ ├── ForestGenerator.java │ │ │ │ └── GardenPatchGenerator.java │ │ │ ├── mask │ │ │ │ ├── AbstractExtentMask.java │ │ │ │ ├── AbstractMask.java │ │ │ │ ├── AbstractMask2D.java │ │ │ │ ├── BiomeMask.java │ │ │ │ ├── BiomeMask2D.java │ │ │ │ ├── BlockCategoryMask.java │ │ │ │ ├── BlockMask.java │ │ │ │ ├── BlockStateMask.java │ │ │ │ ├── BlockTypeMask.java │ │ │ │ ├── BoundedHeightMask.java │ │ │ │ ├── ExistingBlockMask.java │ │ │ │ ├── ExpressionMask.java │ │ │ │ ├── ExpressionMask2D.java │ │ │ │ ├── Mask.java │ │ │ │ ├── Mask2D.java │ │ │ │ ├── MaskIntersection.java │ │ │ │ ├── MaskIntersection2D.java │ │ │ │ ├── MaskMemoizer.java │ │ │ │ ├── MaskMemoizer2D.java │ │ │ │ ├── MaskUnion.java │ │ │ │ ├── MaskUnion2D.java │ │ │ │ ├── Masks.java │ │ │ │ ├── NoiseFilter.java │ │ │ │ ├── NoiseFilter2D.java │ │ │ │ ├── OffsetMask.java │ │ │ │ ├── OffsetMask2D.java │ │ │ │ ├── OffsetsMask.java │ │ │ │ ├── OffsetsMask2D.java │ │ │ │ ├── RegionMask.java │ │ │ │ ├── SolidBlockMask.java │ │ │ │ ├── SplatterMask.java │ │ │ │ └── SplatterMask2D.java │ │ │ ├── operation │ │ │ │ ├── ChangeSetExecutor.java │ │ │ │ ├── DelegateOperation.java │ │ │ │ ├── ForwardExtentCopy.java │ │ │ │ ├── Operation.java │ │ │ │ ├── OperationQueue.java │ │ │ │ ├── Operations.java │ │ │ │ ├── RunContext.java │ │ │ │ ├── SetBlockMap.java │ │ │ │ └── SetLocatedBlocks.java │ │ │ ├── pattern │ │ │ │ ├── AbstractExtentPattern.java │ │ │ │ ├── AbstractPattern.java │ │ │ │ ├── BiomePattern.java │ │ │ │ ├── BlockPattern.java │ │ │ │ ├── ClipboardPattern.java │ │ │ │ ├── ExtentBufferedCompositePattern.java │ │ │ │ ├── ExtentPattern.java │ │ │ │ ├── Pattern.java │ │ │ │ ├── RandomPattern.java │ │ │ │ ├── RandomStatePattern.java │ │ │ │ ├── RepeatingExtentPattern.java │ │ │ │ ├── StateApplyingPattern.java │ │ │ │ ├── TypeApplyingPattern.java │ │ │ │ └── WaterloggedRemover.java │ │ │ ├── util │ │ │ │ ├── FlatRegionOffset.java │ │ │ │ └── RegionOffset.java │ │ │ └── visitor │ │ │ │ ├── BreadthFirstSearch.java │ │ │ │ ├── DownwardVisitor.java │ │ │ │ ├── EntityVisitor.java │ │ │ │ ├── FlatRegionVisitor.java │ │ │ │ ├── LayerVisitor.java │ │ │ │ ├── NonRisingVisitor.java │ │ │ │ ├── RecursiveVisitor.java │ │ │ │ └── RegionVisitor.java │ │ │ ├── history │ │ │ ├── UndoContext.java │ │ │ ├── change │ │ │ │ ├── BiomeChange.java │ │ │ │ ├── BiomeChange3D.java │ │ │ │ ├── BlockChange.java │ │ │ │ ├── Change.java │ │ │ │ ├── EntityCreate.java │ │ │ │ └── EntityRemove.java │ │ │ └── changeset │ │ │ │ ├── ArrayListHistory.java │ │ │ │ ├── BlockOptimizedHistory.java │ │ │ │ └── ChangeSet.java │ │ │ ├── internal │ │ │ ├── Constants.java │ │ │ ├── SchematicsEventListener.java │ │ │ ├── annotation │ │ │ │ ├── Chunk3d.java │ │ │ │ ├── ClipboardMask.java │ │ │ │ ├── Direction.java │ │ │ │ ├── MultiDirection.java │ │ │ │ ├── Offset.java │ │ │ │ ├── OptionalArg.java │ │ │ │ ├── Radii.java │ │ │ │ ├── Selection.java │ │ │ │ └── VertHeight.java │ │ │ ├── anvil │ │ │ │ ├── ChunkDeleter.java │ │ │ │ ├── ChunkDeletionInfo.java │ │ │ │ └── RegionAccess.java │ │ │ ├── block │ │ │ │ └── BlockStateIdAccess.java │ │ │ ├── command │ │ │ │ ├── CommandArgParser.java │ │ │ │ ├── CommandLoggingHandler.java │ │ │ │ ├── CommandRegistrationHandler.java │ │ │ │ ├── CommandUtil.java │ │ │ │ └── exception │ │ │ │ │ ├── ExceptionConverter.java │ │ │ │ │ ├── ExceptionConverterHelper.java │ │ │ │ │ ├── ExceptionMatch.java │ │ │ │ │ └── WorldEditExceptionConverter.java │ │ │ ├── cui │ │ │ │ ├── CUIEvent.java │ │ │ │ ├── CUIRegion.java │ │ │ │ ├── SelectionCylinderEvent.java │ │ │ │ ├── SelectionEllipsoidPointEvent.java │ │ │ │ ├── SelectionMinMaxEvent.java │ │ │ │ ├── SelectionPoint2DEvent.java │ │ │ │ ├── SelectionPointEvent.java │ │ │ │ ├── SelectionPolygonEvent.java │ │ │ │ ├── SelectionShapeEvent.java │ │ │ │ └── ServerCUIHandler.java │ │ │ ├── event │ │ │ │ └── InteractionDebouncer.java │ │ │ ├── expression │ │ │ │ ├── CompiledExpression.java │ │ │ │ ├── EvaluationException.java │ │ │ │ ├── ExecutionData.java │ │ │ │ ├── Expression.java │ │ │ │ ├── ExpressionEnvironment.java │ │ │ │ ├── ExpressionException.java │ │ │ │ ├── ExpressionFunction.java │ │ │ │ ├── ExpressionHelper.java │ │ │ │ ├── ExpressionTimeoutException.java │ │ │ │ ├── ExpressionValidator.java │ │ │ │ ├── Functions.java │ │ │ │ ├── Identifiable.java │ │ │ │ ├── LexerErrorListener.java │ │ │ │ ├── LexerException.java │ │ │ │ ├── LocalSlot.java │ │ │ │ ├── ParserErrorListener.java │ │ │ │ ├── ParserException.java │ │ │ │ ├── SlotTable.java │ │ │ │ └── invoke │ │ │ │ │ ├── BreakException.java │ │ │ │ │ ├── CompilingVisitor.java │ │ │ │ │ ├── ExecNode.java │ │ │ │ │ ├── ExpressionCompiler.java │ │ │ │ │ ├── ExpressionHandles.java │ │ │ │ │ └── ReturnException.java │ │ │ ├── helper │ │ │ │ └── MCDirections.java │ │ │ ├── registry │ │ │ │ ├── AbstractFactory.java │ │ │ │ ├── InputParser.java │ │ │ │ └── SimpleInputParser.java │ │ │ ├── util │ │ │ │ ├── ClipboardTransformBaker.java │ │ │ │ ├── DeprecationUtil.java │ │ │ │ ├── ErrorReporting.java │ │ │ │ ├── InfoEntryPoint.java │ │ │ │ ├── LogManagerCompat.java │ │ │ │ ├── NonAbstractForCompatibility.java │ │ │ │ ├── RegionOptimizedVectorSorter.java │ │ │ │ ├── Substring.java │ │ │ │ └── VarIntIterator.java │ │ │ └── wna │ │ │ │ ├── WorldNativeAccess.java │ │ │ │ └── package-info.java │ │ │ ├── math │ │ │ ├── BitMath.java │ │ │ ├── BlockVector2.java │ │ │ ├── BlockVector3.java │ │ │ ├── MathUtils.java │ │ │ ├── RegionOptimizedChunkComparator.java │ │ │ ├── RegionOptimizedComparator.java │ │ │ ├── Vector2.java │ │ │ ├── Vector3.java │ │ │ ├── convolution │ │ │ │ ├── GaussianKernel.java │ │ │ │ ├── HeightMap.java │ │ │ │ ├── HeightMapFilter.java │ │ │ │ ├── Kernel.java │ │ │ │ ├── LinearKernel.java │ │ │ │ └── SnowHeightMap.java │ │ │ ├── geom │ │ │ │ └── Polygons.java │ │ │ ├── interpolation │ │ │ │ ├── Interpolation.java │ │ │ │ ├── KochanekBartelsInterpolation.java │ │ │ │ ├── LinearInterpolation.java │ │ │ │ ├── Node.java │ │ │ │ └── ReparametrisingInterpolation.java │ │ │ ├── noise │ │ │ │ ├── JLibNoiseGenerator.java │ │ │ │ ├── NoiseGenerator.java │ │ │ │ ├── PerlinNoise.java │ │ │ │ ├── RandomNoise.java │ │ │ │ ├── RidgedMultiFractalNoise.java │ │ │ │ └── VoronoiNoise.java │ │ │ └── transform │ │ │ │ ├── AffineTransform.java │ │ │ │ ├── CombinedTransform.java │ │ │ │ ├── Identity.java │ │ │ │ ├── Transform.java │ │ │ │ └── Transforms.java │ │ │ ├── regions │ │ │ ├── AbstractFlatRegion.java │ │ │ ├── AbstractRegion.java │ │ │ ├── ConvexPolyhedralRegion.java │ │ │ ├── CuboidRegion.java │ │ │ ├── CylinderRegion.java │ │ │ ├── EllipsoidRegion.java │ │ │ ├── FlatRegion.java │ │ │ ├── NullRegion.java │ │ │ ├── Polygonal2DRegion.java │ │ │ ├── Region.java │ │ │ ├── RegionIntersection.java │ │ │ ├── RegionOperationException.java │ │ │ ├── RegionSelector.java │ │ │ ├── Regions.java │ │ │ ├── TransformRegion.java │ │ │ ├── factory │ │ │ │ ├── CuboidRegionFactory.java │ │ │ │ ├── CylinderRegionFactory.java │ │ │ │ ├── FixedHeightCuboidRegionFactory.java │ │ │ │ ├── FixedHeightCylinderRegionFactory.java │ │ │ │ ├── RegionFactory.java │ │ │ │ └── SphereRegionFactory.java │ │ │ ├── iterator │ │ │ │ ├── FlatRegion3DIterator.java │ │ │ │ ├── FlatRegionIterator.java │ │ │ │ └── RegionIterator.java │ │ │ ├── polyhedron │ │ │ │ ├── Edge.java │ │ │ │ └── Triangle.java │ │ │ ├── selector │ │ │ │ ├── ConvexPolyhedralRegionSelector.java │ │ │ │ ├── CuboidRegionSelector.java │ │ │ │ ├── CylinderRegionSelector.java │ │ │ │ ├── EllipsoidRegionSelector.java │ │ │ │ ├── ExtendingCuboidRegionSelector.java │ │ │ │ ├── Polygonal2DRegionSelector.java │ │ │ │ ├── RegionSelectorType.java │ │ │ │ ├── SphereRegionSelector.java │ │ │ │ └── limit │ │ │ │ │ ├── PermissiveSelectorLimits.java │ │ │ │ │ └── SelectorLimits.java │ │ │ └── shape │ │ │ │ ├── ArbitraryBiomeShape.java │ │ │ │ ├── ArbitraryShape.java │ │ │ │ ├── RegionShape.java │ │ │ │ └── WorldEditExpressionEnvironment.java │ │ │ ├── registry │ │ │ ├── Category.java │ │ │ ├── Keyed.java │ │ │ ├── NamespacedRegistry.java │ │ │ ├── Registry.java │ │ │ └── state │ │ │ │ ├── AbstractProperty.java │ │ │ │ ├── BooleanProperty.java │ │ │ │ ├── DirectionalProperty.java │ │ │ │ ├── EnumProperty.java │ │ │ │ ├── IntegerProperty.java │ │ │ │ └── Property.java │ │ │ ├── scripting │ │ │ ├── CraftScriptContext.java │ │ │ ├── CraftScriptEngine.java │ │ │ ├── CraftScriptEnvironment.java │ │ │ ├── MinecraftHidingClassShutter.java │ │ │ ├── RhinoContextFactory.java │ │ │ └── RhinoCraftScriptEngine.java │ │ │ ├── session │ │ │ ├── ClipboardHolder.java │ │ │ ├── MissingSessionException.java │ │ │ ├── PasteBuilder.java │ │ │ ├── Placement.java │ │ │ ├── PlacementType.java │ │ │ ├── SessionKey.java │ │ │ ├── SessionManager.java │ │ │ ├── SessionOwner.java │ │ │ ├── TransientSessionException.java │ │ │ ├── request │ │ │ │ ├── Request.java │ │ │ │ ├── RequestExtent.java │ │ │ │ └── RequestSelection.java │ │ │ └── storage │ │ │ │ ├── JsonFileSessionStore.java │ │ │ │ ├── SessionStore.java │ │ │ │ └── VoidStore.java │ │ │ ├── util │ │ │ ├── Countable.java │ │ │ ├── Direction.java │ │ │ ├── Enums.java │ │ │ ├── Faceted.java │ │ │ ├── FileDialogUtil.java │ │ │ ├── GuavaUtil.java │ │ │ ├── HandSide.java │ │ │ ├── Identifiable.java │ │ │ ├── LocatedBlock.java │ │ │ ├── Location.java │ │ │ ├── PropertiesConfiguration.java │ │ │ ├── SideEffect.java │ │ │ ├── SideEffectSet.java │ │ │ ├── TargetBlock.java │ │ │ ├── TreeGenerator.java │ │ │ ├── WeightedChoice.java │ │ │ ├── YAMLConfiguration.java │ │ │ ├── asset │ │ │ │ ├── AssetLoadTask.java │ │ │ │ ├── AssetLoader.java │ │ │ │ ├── AssetLoaders.java │ │ │ │ ├── ImageHeightmapLoader.java │ │ │ │ └── holder │ │ │ │ │ └── ImageHeightmap.java │ │ │ ├── auth │ │ │ │ ├── AuthorizationException.java │ │ │ │ └── Subject.java │ │ │ ├── collection │ │ │ │ ├── BlockMap.java │ │ │ │ ├── DoubleArrayList.java │ │ │ │ ├── Int2BaseBlockMap.java │ │ │ │ ├── LocatedBlockList.java │ │ │ │ ├── LongPositionList.java │ │ │ │ ├── MoreStreams.java │ │ │ │ ├── PositionList.java │ │ │ │ └── VectorPositionList.java │ │ │ ├── concurrency │ │ │ │ ├── EvenMoreExecutors.java │ │ │ │ └── LazyReference.java │ │ │ ├── eventbus │ │ │ │ ├── AnnotatedSubscriberFinder.java │ │ │ │ ├── EventBus.java │ │ │ │ ├── EventHandler.java │ │ │ │ ├── HierarchyCache.java │ │ │ │ ├── MethodEventHandler.java │ │ │ │ ├── MethodHandleEventHandler.java │ │ │ │ ├── Subscribe.java │ │ │ │ └── SubscriberFindingStrategy.java │ │ │ ├── formatting │ │ │ │ ├── WorldEditText.java │ │ │ │ ├── component │ │ │ │ │ ├── CodeFormat.java │ │ │ │ │ ├── CommandListBox.java │ │ │ │ │ ├── CommandUsageBox.java │ │ │ │ │ ├── ErrorFormat.java │ │ │ │ │ ├── InvalidComponentException.java │ │ │ │ │ ├── LabelFormat.java │ │ │ │ │ ├── MessageBox.java │ │ │ │ │ ├── PaginationBox.java │ │ │ │ │ ├── SideEffectBox.java │ │ │ │ │ ├── SubtleFormat.java │ │ │ │ │ ├── TextComponentProducer.java │ │ │ │ │ └── TextUtils.java │ │ │ │ └── text │ │ │ │ │ └── serializer │ │ │ │ │ └── gson │ │ │ │ │ └── StyleSerializer.java │ │ │ ├── function │ │ │ │ ├── IOFunction.java │ │ │ │ ├── IORunnable.java │ │ │ │ └── LevenshteinDistance.java │ │ │ ├── gson │ │ │ │ ├── BlockVectorAdapter.java │ │ │ │ ├── GsonUtil.java │ │ │ │ └── VectorAdapter.java │ │ │ ├── io │ │ │ │ ├── Closer.java │ │ │ │ ├── ForwardSeekableInputStream.java │ │ │ │ ├── ResourceLoader.java │ │ │ │ ├── WorldEditResourceLoader.java │ │ │ │ └── file │ │ │ │ │ ├── ArchiveDir.java │ │ │ │ │ ├── ArchiveNioSupport.java │ │ │ │ │ ├── ArchiveNioSupports.java │ │ │ │ │ ├── ArchiveUnpacker.java │ │ │ │ │ ├── AttributeTarget.java │ │ │ │ │ ├── FileSelectionAbortedException.java │ │ │ │ │ ├── FilenameException.java │ │ │ │ │ ├── FilenameResolutionException.java │ │ │ │ │ ├── InvalidFilenameException.java │ │ │ │ │ ├── MorePaths.java │ │ │ │ │ ├── SafeFiles.java │ │ │ │ │ └── ZipArchiveNioSupport.java │ │ │ ├── lifecycle │ │ │ │ ├── ConstantLifecycled.java │ │ │ │ ├── FlatMapLifecycled.java │ │ │ │ ├── Lifecycled.java │ │ │ │ ├── LifecycledCallbackHandler.java │ │ │ │ ├── MapLifecycled.java │ │ │ │ ├── SimpleLifecycled.java │ │ │ │ └── Token.java │ │ │ ├── logging │ │ │ │ ├── DynamicStreamHandler.java │ │ │ │ └── LogFormat.java │ │ │ ├── net │ │ │ │ └── HttpRequest.java │ │ │ ├── paste │ │ │ │ ├── ActorCallbackPaste.java │ │ │ │ ├── EngineHubPaste.java │ │ │ │ ├── PasteMetadata.java │ │ │ │ ├── Paster.java │ │ │ │ └── Pasters.java │ │ │ ├── report │ │ │ │ ├── ConfigReport.java │ │ │ │ ├── DataReport.java │ │ │ │ ├── HierarchyObjectReport.java │ │ │ │ ├── Report.java │ │ │ │ ├── ReportList.java │ │ │ │ ├── ShallowObjectReport.java │ │ │ │ ├── StackTraceReport.java │ │ │ │ ├── SystemInfoReport.java │ │ │ │ └── Unreported.java │ │ │ ├── task │ │ │ │ ├── AbstractTask.java │ │ │ │ ├── FutureForwardingTask.java │ │ │ │ ├── SimpleSupervisor.java │ │ │ │ ├── Supervisor.java │ │ │ │ ├── Task.java │ │ │ │ ├── TaskStateComparator.java │ │ │ │ └── progress │ │ │ │ │ ├── Progress.java │ │ │ │ │ ├── ProgressIterator.java │ │ │ │ │ └── ProgressObservable.java │ │ │ ├── time │ │ │ │ ├── FileNameDateTimeParser.java │ │ │ │ ├── ModificationDateTimeParser.java │ │ │ │ └── SnapshotDateTimeParser.java │ │ │ └── translation │ │ │ │ └── TranslationManager.java │ │ │ └── world │ │ │ ├── AbstractWorld.java │ │ │ ├── DataException.java │ │ │ ├── DataFixer.java │ │ │ ├── NbtValued.java │ │ │ ├── NullWorld.java │ │ │ ├── RegenOptions.java │ │ │ ├── World.java │ │ │ ├── WorldUnloadedException.java │ │ │ ├── biome │ │ │ ├── BiomeCategories.java │ │ │ ├── BiomeCategory.java │ │ │ ├── BiomeData.java │ │ │ ├── BiomeName.java │ │ │ ├── BiomeType.java │ │ │ ├── BiomeTypes.java │ │ │ └── Biomes.java │ │ │ ├── block │ │ │ ├── BaseBlock.java │ │ │ ├── BlockCategories.java │ │ │ ├── BlockCategory.java │ │ │ ├── BlockState.java │ │ │ ├── BlockStateHolder.java │ │ │ ├── BlockType.java │ │ │ ├── BlockTypes.java │ │ │ └── FuzzyBlockState.java │ │ │ ├── chunk │ │ │ ├── AnvilChunk.java │ │ │ ├── AnvilChunk13.java │ │ │ ├── AnvilChunk16.java │ │ │ ├── AnvilChunk18.java │ │ │ ├── Chunk.java │ │ │ ├── OldChunk.java │ │ │ └── PackedIntArrayReader.java │ │ │ ├── entity │ │ │ ├── EntityType.java │ │ │ └── EntityTypes.java │ │ │ ├── fluid │ │ │ ├── FluidCategories.java │ │ │ ├── FluidCategory.java │ │ │ ├── FluidType.java │ │ │ └── FluidTypes.java │ │ │ ├── gamemode │ │ │ ├── GameMode.java │ │ │ └── GameModes.java │ │ │ ├── generation │ │ │ ├── ConfiguredFeatureType.java │ │ │ └── StructureType.java │ │ │ ├── item │ │ │ ├── ItemCategories.java │ │ │ ├── ItemCategory.java │ │ │ ├── ItemType.java │ │ │ └── ItemTypes.java │ │ │ ├── registry │ │ │ ├── BiomeRegistry.java │ │ │ ├── BlockCategoryRegistry.java │ │ │ ├── BlockMaterial.java │ │ │ ├── BlockRegistry.java │ │ │ ├── BundledBlockData.java │ │ │ ├── BundledBlockRegistry.java │ │ │ ├── BundledItemData.java │ │ │ ├── BundledItemRegistry.java │ │ │ ├── BundledRegistries.java │ │ │ ├── CategoryRegistry.java │ │ │ ├── EntityRegistry.java │ │ │ ├── ItemCategoryRegistry.java │ │ │ ├── ItemMaterial.java │ │ │ ├── ItemRegistry.java │ │ │ ├── LegacyMapper.java │ │ │ ├── NullBiomeRegistry.java │ │ │ ├── NullBlockCategoryRegistry.java │ │ │ ├── NullEntityRegistry.java │ │ │ ├── NullItemCategoryRegistry.java │ │ │ ├── PassthroughBlockMaterial.java │ │ │ ├── PassthroughItemMaterial.java │ │ │ ├── Registries.java │ │ │ ├── SimpleBlockMaterial.java │ │ │ └── SimpleItemMaterial.java │ │ │ ├── snapshot │ │ │ ├── InvalidSnapshotException.java │ │ │ ├── ModificationTimerParser.java │ │ │ ├── Snapshot.java │ │ │ ├── SnapshotDateParser.java │ │ │ ├── SnapshotRepository.java │ │ │ ├── SnapshotRestore.java │ │ │ ├── YYMMDDHHIISSParser.java │ │ │ └── experimental │ │ │ │ ├── Snapshot.java │ │ │ │ ├── SnapshotComparator.java │ │ │ │ ├── SnapshotDatabase.java │ │ │ │ ├── SnapshotInfo.java │ │ │ │ ├── SnapshotRestore.java │ │ │ │ ├── fs │ │ │ │ ├── FileSystemSnapshotDatabase.java │ │ │ │ └── FolderSnapshot.java │ │ │ │ └── package-info.java │ │ │ ├── storage │ │ │ ├── ChunkStore.java │ │ │ ├── ChunkStoreException.java │ │ │ ├── ChunkStoreHelper.java │ │ │ ├── FileLegacyChunkStore.java │ │ │ ├── FileMcRegionChunkStore.java │ │ │ ├── InvalidFormatException.java │ │ │ ├── LegacyChunkStore.java │ │ │ ├── McRegionChunkStore.java │ │ │ ├── McRegionReader.java │ │ │ ├── MissingChunkException.java │ │ │ ├── MissingWorldException.java │ │ │ ├── NBTConversions.java │ │ │ ├── TrueZipLegacyChunkStore.java │ │ │ ├── TrueZipMcRegionChunkStore.java │ │ │ ├── ZippedLegacyChunkStore.java │ │ │ └── ZippedMcRegionChunkStore.java │ │ │ └── weather │ │ │ ├── WeatherType.java │ │ │ └── WeatherTypes.java │ └── resources │ │ ├── com │ │ └── sk89q │ │ │ └── worldedit │ │ │ └── world │ │ │ └── registry │ │ │ ├── blocks.120.json │ │ │ ├── blocks.121.json │ │ │ ├── blocks.1213.json │ │ │ ├── blocks.1214.json │ │ │ ├── blocks.json │ │ │ ├── items.120.json │ │ │ ├── items.121.json │ │ │ ├── items.1213.json │ │ │ ├── items.1214.json │ │ │ ├── items.json │ │ │ └── legacy.json │ │ └── lang │ │ └── strings.json │ └── test │ ├── java │ └── com │ │ └── sk89q │ │ ├── minecraft │ │ └── util │ │ │ └── commands │ │ │ └── CommandContextTest.java │ │ └── worldedit │ │ ├── BaseWorldEditTest.java │ │ ├── LocalSessionTest.java │ │ ├── extent │ │ └── transform │ │ │ └── BlockTransformExtentTest.java │ │ ├── internal │ │ ├── command │ │ │ └── CommandArgParserTest.java │ │ ├── expression │ │ │ ├── BaseExpressionTest.java │ │ │ ├── ExpressionTest.java │ │ │ ├── ExpressionTestCase.java │ │ │ └── RealExpressionTest.java │ │ └── util │ │ │ ├── DeprecationUtilTest.java │ │ │ └── RegionOptimizedVectorSorterTest.java │ │ ├── math │ │ ├── BlockVector3Test.java │ │ └── convolution │ │ │ ├── GaussianKernelTest.java │ │ │ └── HeightMapFilterTest.java │ │ ├── session │ │ ├── PlacementTest.java │ │ └── PlacementTypeTest.java │ │ ├── util │ │ ├── LocationTest.java │ │ ├── SideEffectSetTest.java │ │ ├── collection │ │ │ ├── BlockMapTest.java │ │ │ └── PositionListTest.java │ │ ├── eventbus │ │ │ └── EventBusTest.java │ │ ├── io │ │ │ └── file │ │ │ │ └── MorePathsTest.java │ │ └── test │ │ │ ├── ResourceLockKeys.java │ │ │ ├── VariedVectorGenerator.java │ │ │ └── VariedVectorPair.java │ │ └── world │ │ └── snapshot │ │ └── experimental │ │ └── fs │ │ ├── EntryMaker.java │ │ ├── FSSDContext.java │ │ ├── FSSDTestType.java │ │ └── FileSystemSnapshotDatabaseTest.java │ └── resources │ ├── junit-platform.properties │ └── world_region.mca.gzip ├── worldedit-fabric ├── build.gradle.kts └── src │ └── main │ ├── java │ └── com │ │ └── sk89q │ │ └── worldedit │ │ └── fabric │ │ ├── CommandWrapper.java │ │ ├── FabricAdapter.java │ │ ├── FabricBiomeRegistry.java │ │ ├── FabricBlockCategoryRegistry.java │ │ ├── FabricBlockCommandSender.java │ │ ├── FabricBlockMaterial.java │ │ ├── FabricBlockRegistry.java │ │ ├── FabricCommandSender.java │ │ ├── FabricConfiguration.java │ │ ├── FabricDataFixer.java │ │ ├── FabricEntityProperties.java │ │ ├── FabricFakePlayer.java │ │ ├── FabricItemCategoryRegistry.java │ │ ├── FabricItemRegistry.java │ │ ├── FabricPermissionsProvider.java │ │ ├── FabricPlatform.java │ │ ├── FabricPlayer.java │ │ ├── FabricRegistries.java │ │ ├── FabricWorld.java │ │ ├── FabricWorldEdit.java │ │ ├── ThreadSafeCache.java │ │ ├── WorldEditGenListener.java │ │ ├── internal │ │ ├── ExtendedChunk.java │ │ ├── ExtendedMinecraftServer.java │ │ ├── FabricEntity.java │ │ ├── FabricPropertyAdapter.java │ │ ├── FabricServerLevelDelegateProxy.java │ │ ├── FabricTransmogrifier.java │ │ ├── FabricWorldNativeAccess.java │ │ ├── MixinConfigPlugin.java │ │ └── NBTConverter.java │ │ └── mixin │ │ ├── MixinLevelChunkSetBlockHook.java │ │ ├── MixinMinecraftServer.java │ │ └── MixinServerGamePacketListenerImpl.java │ └── resources │ ├── assets │ └── worldedit │ │ └── icon.png │ ├── defaults │ └── worldedit.properties │ ├── fabric.mod.json │ ├── pack.mcmeta │ ├── worldedit-fabric.mixins.json │ └── worldedit.accesswidener ├── worldedit-libs ├── README.md ├── build.gradle.kts ├── bukkit │ └── build.gradle.kts ├── cli │ └── build.gradle.kts ├── core │ ├── ap │ │ └── build.gradle.kts │ └── build.gradle.kts ├── fabric │ └── build.gradle.kts ├── neoforge │ └── build.gradle.kts └── sponge │ └── build.gradle.kts ├── worldedit-logo.png ├── worldedit-logo.svg ├── worldedit-mod ├── README.md └── build.gradle.kts ├── worldedit-neoforge ├── build.gradle.kts └── src │ └── main │ ├── java │ └── com │ │ └── sk89q │ │ └── worldedit │ │ └── neoforge │ │ ├── CommandWrapper.java │ │ ├── NeoForgeAdapter.java │ │ ├── NeoForgeBiomeRegistry.java │ │ ├── NeoForgeBlockCategoryRegistry.java │ │ ├── NeoForgeBlockCommandSender.java │ │ ├── NeoForgeBlockMaterial.java │ │ ├── NeoForgeBlockRegistry.java │ │ ├── NeoForgeCommandSender.java │ │ ├── NeoForgeConfiguration.java │ │ ├── NeoForgeDataFixer.java │ │ ├── NeoForgeEntityProperties.java │ │ ├── NeoForgeFakePlayer.java │ │ ├── NeoForgeItemCategoryRegistry.java │ │ ├── NeoForgeItemRegistry.java │ │ ├── NeoForgePermissionsProvider.java │ │ ├── NeoForgePlatform.java │ │ ├── NeoForgePlayer.java │ │ ├── NeoForgeRegistries.java │ │ ├── NeoForgeResourceLoader.java │ │ ├── NeoForgeWatchdog.java │ │ ├── NeoForgeWorld.java │ │ ├── NeoForgeWorldEdit.java │ │ ├── ThreadSafeCache.java │ │ ├── WorldEditGenListener.java │ │ ├── internal │ │ ├── ExtendedChunk.java │ │ ├── NBTConverter.java │ │ ├── NeoForgeEntity.java │ │ ├── NeoForgePropertyAdapter.java │ │ ├── NeoForgeServerLevelDelegateProxy.java │ │ ├── NeoForgeTransmogrifier.java │ │ └── NeoForgeWorldNativeAccess.java │ │ └── mixin │ │ ├── AccessorServerPlayerGameMode.java │ │ ├── MixinLevelChunkSetBlockHook.java │ │ └── MixinServerGamePacketListenerImpl.java │ └── resources │ ├── META-INF │ ├── accesstransformer.cfg │ └── neoforge.mods.toml │ ├── defaults │ └── worldedit.properties │ ├── pack.mcmeta │ ├── worldedit-icon.png │ └── worldedit-neoforge.mixins.json └── worldedit-sponge ├── build.gradle.kts └── src └── main └── java └── com └── sk89q └── worldedit └── sponge ├── CUIChannelHandler.java ├── CommandAdapter.java ├── Constants.java ├── SpongeAdapter.java ├── SpongeBiomeRegistry.java ├── SpongeBlockCategoryRegistry.java ├── SpongeBlockCommandSender.java ├── SpongeBlockMaterial.java ├── SpongeBlockRegistry.java ├── SpongeCommandSender.java ├── SpongeEntity.java ├── SpongeEntityProperties.java ├── SpongeItemCategoryRegistry.java ├── SpongeItemRegistry.java ├── SpongePermissionsProvider.java ├── SpongePlatform.java ├── SpongePlayer.java ├── SpongeRegistries.java ├── SpongeTextAdapter.java ├── SpongeWorld.java ├── SpongeWorldEdit.java ├── SpongeWorldEditListener.java ├── ThreadSafeCache.java ├── config ├── ConfigurateConfiguration.java └── SpongeConfiguration.java └── internal ├── ExtendedChunk.java ├── LocaleResolver.java ├── NbtAdapter.java ├── SpongeTransmogrifier.java └── SpongeWorldNativeAccess.java /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # CRLF -> LF 2 | 59ccc0a5af93d4b3d97df2bd6b946bba5a6d5c5c 3 | # Checkstyle 4 | eb52afa296fffc4397e2f4014c7eb8094f50240e 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | # Force Batch files to CRLF 3 | *.bat eol=crlf -text 4 | 5 | # Java sources 6 | *.java text diff=java 7 | *.kt text diff=java 8 | *.gradle text diff=java 9 | *.gradle.kts text diff=java 10 | 11 | # These files are text and should be normalized (Convert crlf => lf) 12 | *.css text diff=css 13 | *.df text 14 | *.htm text diff=html 15 | *.html text diff=html 16 | *.js text 17 | *.jsp text 18 | *.jspf text 19 | *.jspx text 20 | *.properties text 21 | *.tld text 22 | *.tag text 23 | *.tagx text 24 | *.xml text 25 | 26 | # These files are binary and should be left untouched 27 | # (binary is a macro for -text -diff) 28 | *.class binary 29 | *.dll binary 30 | *.ear binary 31 | *.jar binary 32 | *.so binary 33 | *.war binary 34 | *.jks binary 35 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # All files are owned by the WorldEdit team. 2 | * @EngineHub/worldedit 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: enginehub 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: EngineHub Discord 4 | url: https://discord.gg/EngineHub 5 | about: Please ask and answer questions here. 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for WorldEdit 3 | labels: ['type:feature-request', 'status:pending'] 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: > 9 | Please note: we are currently not accepting feature requests designed to make it 10 | easier to give WorldEdit to all players on a server. WorldEdit is intended for 11 | admin use only. 12 | 13 | - type: textarea 14 | attributes: 15 | label: The Problem 16 | description: > 17 | What is making your WorldEdit experience sub-optimal? This should be something that 18 | cannot be easily solved by existing WorldEdit features. 19 | placeholder: It's hard to ... ; I'm unable to ... 20 | validations: 21 | required: true 22 | 23 | - type: textarea 24 | attributes: 25 | label: A Solution 26 | description: What is your proposed solution to the above problem? 27 | validations: 28 | required: true 29 | 30 | - type: textarea 31 | attributes: 32 | label: Alternatives 33 | description: | 34 | Alternative solutions or workarounds to the problem. 35 | You should also describe why these are not preferable to the given solution. 36 | validations: 37 | required: false 38 | 39 | - type: textarea 40 | attributes: 41 | label: Anything Else? 42 | description: Add any additional context you can provide below. 43 | -------------------------------------------------------------------------------- /.github/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: off 4 | patch: off 5 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | name: Gradle Build 2 | on: [push, pull_request, merge_group] 3 | 4 | jobs: 5 | build: 6 | name: Build WorldEdit on ${{ matrix.os }} 7 | runs-on: ${{ matrix.os }} 8 | strategy: 9 | fail-fast: false 10 | matrix: 11 | os: [ubuntu-latest, windows-latest] 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | 16 | - name: Set up JDK 17 | uses: actions/setup-java@v4 18 | with: 19 | java-version: 21 20 | distribution: 'temurin' 21 | 22 | - name: Setup Gradle 23 | uses: gradle/actions/setup-gradle@v3 24 | with: 25 | cache-read-only: ${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/version/')) }} 26 | 27 | - name: Execute Gradle build 28 | run: ./gradlew build -s 29 | 30 | - uses: actions/upload-artifact@v4 31 | name: Archive Reports 32 | if: always() 33 | with: 34 | name: reports for ${{ matrix.os }} 35 | path: '**/build/reports/**' 36 | 37 | - uses: actions/upload-artifact@v4 38 | name: Archive Logs 39 | if: always() 40 | with: 41 | name: logs for ${{ matrix.os }} 42 | path: '**/*.log' 43 | 44 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Handle stale issues' 2 | on: 3 | workflow_dispatch: 4 | issues: # Run the bot on issue activity for faster response to changes 5 | issue_comment: # Run the bot on issue comment activity for faster response to changes 6 | schedule: 7 | - cron: '42 1 * * *' 8 | 9 | concurrency: 10 | group: stale 11 | 12 | jobs: 13 | stale: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/stale@v9 17 | with: 18 | only-labels: 'status:pending,type:bug' 19 | stale-issue-label: 'status:stale' 20 | stale-issue-message: > 21 | This issue has been automatically marked as stale because it has not been fully confirmed. 22 | It will be closed if no further activity occurs. Thank you for your contributions. 23 | days-before-stale: 30 24 | days-before-close: 7 25 | days-before-pr-stale: -1 26 | days-before-pr-close: -1 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .settings 4 | eclipse 5 | .idea 6 | *.iml 7 | *.ipr 8 | *.iws 9 | 10 | bin 11 | build 12 | target 13 | .gradle 14 | forge-download 15 | out 16 | run 17 | runs 18 | .jqwik-database 19 | 20 | /dependency-reduced-pom.xml 21 | *-private.sh 22 | 23 | # i18n 24 | worldedit-core/src/main/resources/lang/* 25 | !worldedit-core/src/main/resources/lang/strings.json 26 | -------------------------------------------------------------------------------- /HEADER.txt: -------------------------------------------------------------------------------- 1 | WorldEdit, a Minecraft world manipulation toolkit 2 | Copyright (C) sk89q 3 | Copyright (C) WorldEdit team and contributors 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | We only support the latest release of Minecraft, and the latest release of our software. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | Vulnerabilities should be reported to our security email, `security@enginehub.org`. 10 | 11 | WorldEdit is designed to be an admin tool. We do not consider users being able to break limits or cause lag security vulnerabilities _if they are given permission to run the commands_. Only performance issues resulting from players without permissions are considered security vulnerabilities. 12 | -------------------------------------------------------------------------------- /build-logic/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | repositories { 6 | gradlePluginPortal() 7 | maven { 8 | name = "EngineHub Repository" 9 | url = uri("https://maven.enginehub.org/repo/") 10 | } 11 | } 12 | 13 | dependencies { 14 | implementation(gradleApi()) 15 | implementation(libs.licenser) 16 | implementation(libs.grgit) 17 | implementation(libs.japicmp) 18 | implementation(libs.shadow) 19 | implementation(libs.jfrog.buildinfo) 20 | implementation(libs.paperweight) 21 | implementation(libs.gson) 22 | 23 | implementation(libs.sponge.vanillagradle) 24 | implementation(libs.neogradle.neoform) 25 | 26 | constraints { 27 | val asmVersion = "[${libs.versions.minimumAsm.get()},)" 28 | implementation("org.ow2.asm:asm:$asmVersion") { 29 | because("Need Java 21 support in shadow") 30 | } 31 | implementation("org.ow2.asm:asm-commons:$asmVersion") { 32 | because("Need Java 21 support in shadow") 33 | } 34 | implementation("org.vafer:jdependency:[${libs.versions.minimumJdependency.get()},)") { 35 | because("Need Java 21 support in shadow") 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /build-logic/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | versionCatalogs { 3 | create("libs") { 4 | from(files("../gradle/libs.versions.toml")) 5 | } 6 | } 7 | } 8 | 9 | rootProject.name = "build-logic" 10 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/buildlogic.adapter.gradle.kts: -------------------------------------------------------------------------------- 1 | import buildlogic.stringyLibs 2 | import buildlogic.getVersion 3 | 4 | plugins { 5 | `java-library` 6 | id("buildlogic.common") 7 | id("buildlogic.common-java") 8 | id("io.papermc.paperweight.userdev") 9 | } 10 | 11 | paperweight { 12 | injectPaperRepository = false 13 | } 14 | 15 | repositories { 16 | maven { 17 | name = "EngineHub" 18 | url = uri("https://maven.enginehub.org/repo/") 19 | } 20 | mavenCentral() 21 | afterEvaluate { 22 | killNonEngineHubRepositories() 23 | } 24 | } 25 | 26 | dependencies { 27 | "implementation"(project(":worldedit-bukkit")) 28 | constraints { 29 | "remapper"("net.fabricmc:tiny-remapper:[${stringyLibs.getVersion("minimumTinyRemapper")},)") { 30 | because("Need remapper to support Java 21") 31 | } 32 | } 33 | } 34 | 35 | tasks.named("assemble") { 36 | dependsOn("reobfJar") 37 | } 38 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/buildlogic.artifactory-root.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.gradle.api.Project 2 | import org.gradle.kotlin.dsl.configure 3 | import org.gradle.kotlin.dsl.named 4 | import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention 5 | import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask 6 | 7 | plugins { 8 | id("com.jfrog.artifactory") 9 | } 10 | 11 | val ARTIFACTORY_CONTEXT_URL = "artifactory_contextUrl" 12 | val ARTIFACTORY_USER = "artifactory_user" 13 | val ARTIFACTORY_PASSWORD = "artifactory_password" 14 | 15 | if (!project.hasProperty(ARTIFACTORY_CONTEXT_URL)) ext[ARTIFACTORY_CONTEXT_URL] = "http://localhost" 16 | if (!project.hasProperty(ARTIFACTORY_USER)) ext[ARTIFACTORY_USER] = "guest" 17 | if (!project.hasProperty(ARTIFACTORY_PASSWORD)) ext[ARTIFACTORY_PASSWORD] = "" 18 | 19 | configure { 20 | setContextUrl("${project.property(ARTIFACTORY_CONTEXT_URL)}") 21 | clientConfig.publisher.run { 22 | repoKey = when { 23 | "${project.version}".contains("SNAPSHOT") -> "libs-snapshot-local" 24 | else -> "libs-release-local" 25 | } 26 | username = "${project.property(ARTIFACTORY_USER)}" 27 | password = "${project.property(ARTIFACTORY_PASSWORD)}" 28 | isMaven = true 29 | isIvy = false 30 | } 31 | } 32 | 33 | tasks.named("artifactoryPublish") { 34 | isSkip = true 35 | } 36 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/buildlogic.artifactory-sub.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.jfrog.artifactory") 3 | } 4 | 5 | // Artifactory eagerly evaluates publications, so this must run after all changes to artifacts are done 6 | afterEvaluate { 7 | tasks.named("artifactoryPublish") { 8 | publications("maven") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/buildlogic.core-and-platform.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("java") 3 | id("maven-publish") 4 | id("buildlogic.common-java") 5 | id("buildlogic.artifactory-sub") 6 | } 7 | 8 | ext["internalVersion"] = "$version+${rootProject.ext["gitCommitHash"]}" 9 | 10 | publishing { 11 | publications { 12 | register("maven") { 13 | versionMapping { 14 | usage("java-api") { 15 | fromResolutionOf("runtimeClasspath") 16 | } 17 | usage("java-runtime") { 18 | fromResolutionResult() 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/buildlogic/GradleExtras.kt: -------------------------------------------------------------------------------- 1 | package buildlogic 2 | 3 | import org.gradle.api.Project 4 | import org.gradle.api.artifacts.MinimalExternalModuleDependency 5 | import org.gradle.api.artifacts.VersionCatalog 6 | import org.gradle.api.artifacts.VersionCatalogsExtension 7 | import org.gradle.api.artifacts.VersionConstraint 8 | import org.gradle.api.plugins.ExtraPropertiesExtension 9 | import org.gradle.api.plugins.JavaPluginExtension 10 | import org.gradle.api.provider.Provider 11 | import org.gradle.api.tasks.SourceSetContainer 12 | import org.gradle.kotlin.dsl.getByType 13 | import org.gradle.kotlin.dsl.the 14 | 15 | val Project.ext: ExtraPropertiesExtension 16 | get() = extensions.getByType() 17 | 18 | val Project.sourceSets: SourceSetContainer 19 | get() = the().sourceSets 20 | 21 | val Project.stringyLibs: VersionCatalog 22 | get() = extensions.getByType().named("libs") 23 | 24 | fun VersionCatalog.getLibrary(name: String): Provider = findLibrary(name).orElseThrow { 25 | error("Library $name not found in version catalog") 26 | } 27 | 28 | fun VersionCatalog.getVersion(name: String): VersionConstraint = findVersion(name).orElseThrow { 29 | error("Version $name not found in version catalog") 30 | } 31 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/buildlogic/PlatformExtension.kt: -------------------------------------------------------------------------------- 1 | package buildlogic 2 | 3 | import org.gradle.api.provider.MapProperty 4 | import org.gradle.api.provider.Property 5 | 6 | interface PlatformExtension { 7 | val kind: Property 8 | val includeClasspath: Property 9 | val extraAttributes: MapProperty 10 | } 11 | 12 | sealed class WorldEditKind( 13 | val name: String, 14 | val mainClass: String = "com.sk89q.worldedit.internal.util.InfoEntryPoint" 15 | ) { 16 | class Standalone(mainClass: String) : WorldEditKind("STANDALONE", mainClass) 17 | object Mod : WorldEditKind("MOD") 18 | object Plugin : WorldEditKind("PLUGIN") 19 | } 20 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/japicmp/accept/AcceptedRegressionsRulePostProcess.kt: -------------------------------------------------------------------------------- 1 | package japicmp.accept 2 | 3 | import me.champeau.gradle.japicmp.report.PostProcessViolationsRule 4 | import me.champeau.gradle.japicmp.report.ViolationCheckContextWithViolations 5 | 6 | class AcceptedRegressionsRulePostProcess : PostProcessViolationsRule { 7 | override fun execute(context: ViolationCheckContextWithViolations) { 8 | val changeParams = context.changeParams 9 | val seenApiChanges = context.seenApiChanges 10 | val left = HashSet(changeParams.changeToReason.keys) 11 | left.removeAll(seenApiChanges) 12 | if (!left.isEmpty()) { 13 | val formattedLeft: String = left.joinToString(separator = "\n") { it.toString() } 14 | throw RuntimeException("The following regressions are declared as accepted, but didn't match any rule:\n\n$formattedLeft") 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/japicmp/accept/AcceptingSetupRule.kt: -------------------------------------------------------------------------------- 1 | package japicmp.accept 2 | 3 | import me.champeau.gradle.japicmp.report.SetupRule 4 | import me.champeau.gradle.japicmp.report.ViolationCheckContext 5 | import java.nio.file.Path 6 | import java.nio.file.Paths 7 | 8 | class AcceptingSetupRule(private val params: Map) : SetupRule { 9 | companion object { 10 | fun createParams(changeFile: Path): Map { 11 | return mapOf( 12 | "changeFile" to changeFile.toAbsolutePath().toString(), 13 | "fileName" to changeFile.fileName.toString() 14 | ) 15 | } 16 | } 17 | 18 | override fun execute(t: ViolationCheckContext) { 19 | @Suppress("UNCHECKED_CAST") 20 | val userData = t.userData as MutableMap 21 | userData["changeParams"] = ChangeParams( 22 | changeToReason = loadAcceptedApiChanges(Paths.get(params["changeFile"]!!)), 23 | changeFileName = params["fileName"]!!, 24 | ) 25 | userData["seenApiChanges"] = HashSet() 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/japicmp/accept/ChangeParams.kt: -------------------------------------------------------------------------------- 1 | package japicmp.accept 2 | 3 | data class ChangeParams( 4 | val changeToReason: Map, 5 | val changeFileName: String, 6 | ) 7 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/japicmp/accept/LICENSE.md: -------------------------------------------------------------------------------- 1 | Code in this package is mostly taken and adapted from 2 | [Gradle's binary compat checking](https://github.com/gradle/gradle/blob/master/build-logic/binary-compatibility), 3 | which is licensed under the Apache License 2.0. 4 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/japicmp/accept/apichanges.kt: -------------------------------------------------------------------------------- 1 | package japicmp.accept 2 | 3 | import com.google.gson.Gson 4 | import com.google.gson.reflect.TypeToken 5 | import java.nio.file.Files 6 | import java.nio.file.Path 7 | 8 | typealias ApiChangesDiskFormat = Map>; 9 | fun loadAcceptedApiChanges(path: Path): Map { 10 | val fromDisk: ApiChangesDiskFormat = Files.newBufferedReader(path).use { 11 | Gson().fromJson(it, object : TypeToken() {}.type) 12 | } 13 | return fromDisk.asSequence().flatMap { (key, value) -> 14 | value.asSequence().map { it to key } 15 | }.toMap() 16 | } 17 | 18 | data class ApiChange( 19 | val type: String, 20 | val member: String, 21 | val changes: List, 22 | ) 23 | -------------------------------------------------------------------------------- /build-logic/src/main/kotlin/japicmp/accept/userdata.kt: -------------------------------------------------------------------------------- 1 | package japicmp.accept 2 | 3 | import me.champeau.gradle.japicmp.report.ViolationCheckContext 4 | 5 | val ViolationCheckContext.changeParams 6 | get() = userData["changeParams"] as ChangeParams 7 | 8 | @Suppress("UNCHECKED_CAST") 9 | val ViolationCheckContext.seenApiChanges 10 | get() = userData["seenApiChanges"] as MutableSet 11 | -------------------------------------------------------------------------------- /config/checkstyle/checkstyle-suppression.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /contrib/craftscripts/README.md: -------------------------------------------------------------------------------- 1 | CraftScripts are script files for WorldEdit that let you write world 2 | editing scripts with JavaScript easily. 3 | 4 | Example usage: 5 | /cs maze.js glowstone 10 10 6 | 7 | You may or may not install these scripts -- it is optional. If you are, however, 8 | place the entire `craftscripts/` folder into the respective directory for the platform 9 | that you have installed WorldEdit. 10 | 11 | In order to be able to use CraftScripts, you must install the Rhino JavaScript library. 12 | The installation page linked above has information about that. More information 13 | about scripts in general can be found [on our docs](https://worldedit.enginehub.org/en/latest/usage/other/craftscripts/) 14 | -------------------------------------------------------------------------------- /contrib/craftscripts/SUBMITTING.md: -------------------------------------------------------------------------------- 1 | Write a cool script? You can submit a pull request to [our GitHub Repository](https://github.com/EngineHub/WorldEdit). 2 | We will consider your script for inclusion in the WorldEdit repository. CraftScripts in the WorldEdit repository are 3 | licensed under GPLv3, like the rest of WorldEdit. 4 | 5 | You can also post your scripts on [our Discord](https://discord.gg/enginehub) in the `#showcase` channel 6 | -------------------------------------------------------------------------------- /crowdin-distributor.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # For snapshots, please specify the full version (with date and time) 5 | cdist_version="0.1.0-20240706.110724-10" 6 | cdist_path_version="$cdist_version" 7 | 8 | if [ -n "${cdist_version#*-}" ]; then 9 | cdist_path_version="${cdist_version%%-*}-SNAPSHOT" 10 | fi 11 | url="https://maven.enginehub.org/repo/org/enginehub/crowdin/crowdin-distributor/$cdist_path_version/crowdin-distributor-$cdist_version-bundle.zip" 12 | [ -d ./build ] || mkdir ./build 13 | curl "$url" >./build/cdist.zip 14 | (cd ./build && unzip -o cdist.zip) 15 | 16 | # CROWDIN_DISTRIBUTOR_TOKEN is set by CI 17 | export CROWDIN_DISTRIBUTOR_ON_CHANGE="true" 18 | export CROWDIN_DISTRIBUTOR_PROJECT_ID="360697" 19 | export CROWDIN_DISTRIBUTOR_MODULE="worldedit-lang" 20 | ## Full path to the source file, will be uploaded to crowdin, must already have uploaded at least once (will not create a new file) 21 | export CROWDIN_DISTRIBUTOR_SOURCE_FILE="./worldedit-core/src/main/resources/lang/strings.json" 22 | # Artifactory & Build Number is set by CI 23 | export CROWDIN_DISTRIBUTOR_OPTS="" 24 | "./build/crowdin-distributor-$cdist_path_version/bin/crowdin-distributor" 25 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | group=com.sk89q.worldedit 2 | version=7.3.14-SNAPSHOT 3 | 4 | org.gradle.jvmargs=-Xmx1500M 5 | org.gradle.parallel=true 6 | 7 | loom_fabric_repository=https://maven.enginehub.org/artifactory/fabricmc/ 8 | loom_libraries_base=https://maven.enginehub.org/artifactory/minecraft/ 9 | -------------------------------------------------------------------------------- /gradle/gradle-daemon-jvm.properties: -------------------------------------------------------------------------------- 1 | #This file is generated by updateDaemonJvm 2 | toolchainVersion=21 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngineHub/WorldEdit/4b5c5316e7e650bee746eeb797510950d216addf/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /verification/src/changes/accepted-bukkit-public-api-changes.json: -------------------------------------------------------------------------------- 1 | { 2 | "Incorrect removal detection due to problems with classpath": [ 3 | { 4 | "type": "com.sk89q.worldedit.bukkit.BukkitWorld", 5 | "member": "Method com.sk89q.worldedit.bukkit.BukkitWorld.fullySupports3DBiomes()", 6 | "changes": [ 7 | "METHOD_REMOVED" 8 | ] 9 | }, 10 | { 11 | "type": "com.sk89q.worldedit.bukkit.BukkitServerInterface", 12 | "member": "Method com.sk89q.worldedit.bukkit.BukkitServerInterface.getId()", 13 | "changes": [ 14 | "METHOD_REMOVED" 15 | ] 16 | }, 17 | { 18 | "type": "com.sk89q.worldedit.bukkit.BukkitWorld", 19 | "member": "Method com.sk89q.worldedit.bukkit.BukkitWorld.getId()", 20 | "changes": [ 21 | "METHOD_REMOVED" 22 | ] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /verification/src/changes/accepted-cli-public-api-changes.json: -------------------------------------------------------------------------------- 1 | { 2 | "Incorrect removal detection due to problems with classpath": [ 3 | { 4 | "type": "com.sk89q.worldedit.cli.schematic.ClipboardWorld", 5 | "member": "Method com.sk89q.worldedit.cli.schematic.ClipboardWorld.getId()", 6 | "changes": [ 7 | "METHOD_REMOVED" 8 | ] 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /verification/src/changes/accepted-fabric-public-api-changes.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /verification/src/changes/accepted-neoforge-public-api-changes.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /verification/src/changes/accepted-sponge-public-api-changes.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /worldedit-bukkit/adapters/adapter-1.21.3/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension 2 | 3 | plugins { 4 | id("buildlogic.adapter") 5 | } 6 | 7 | dependencies { 8 | // https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/ 9 | the().paperDevBundle("1.21.3-R0.1-20250328.155925-87") 10 | } 11 | -------------------------------------------------------------------------------- /worldedit-bukkit/adapters/adapter-1.21.4/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension 2 | 3 | plugins { 4 | id("buildlogic.adapter") 5 | } 6 | 7 | dependencies { 8 | // https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/ 9 | the().paperDevBundle("1.21.4-R0.1-20250519.180216-226") 10 | } 11 | -------------------------------------------------------------------------------- /worldedit-bukkit/adapters/adapter-1.21.5/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension 2 | 3 | plugins { 4 | id("buildlogic.adapter") 5 | } 6 | 7 | dependencies { 8 | // https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/ 9 | the().paperDevBundle("1.21.5-R0.1-SNAPSHOT") 10 | } 11 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/java/com/sk89q/bukkit/util/CommandInspector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.bukkit.util; 21 | 22 | import org.bukkit.command.Command; 23 | import org.bukkit.command.CommandSender; 24 | 25 | public interface CommandInspector { 26 | 27 | String getShortText(Command command); 28 | 29 | String getFullText(Command command); 30 | 31 | boolean testPermission(CommandSender sender, Command command); 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/java/com/sk89q/wepif/PermissionsResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.wepif; 21 | 22 | public interface PermissionsResolver extends PermissionsProvider { 23 | void load(); 24 | 25 | String getDetectionMessage(); 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/java/com/sk89q/wepif/WEPIFRuntimeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.wepif; 21 | 22 | public class WEPIFRuntimeException extends RuntimeException { 23 | 24 | public WEPIFRuntimeException(String message) { 25 | super(message); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWatchdog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.bukkit; 21 | 22 | import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter; 23 | import com.sk89q.worldedit.extension.platform.Watchdog; 24 | 25 | class BukkitWatchdog implements Watchdog { 26 | 27 | private final BukkitImplAdapter adapter; 28 | 29 | BukkitWatchdog(BukkitImplAdapter adapter) { 30 | this.adapter = adapter; 31 | } 32 | 33 | @Override 34 | public void tick() { 35 | adapter.tickWatchdog(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/AdapterLoadException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.bukkit.adapter; 21 | 22 | /** 23 | * Thrown when no adapter can be found. 24 | */ 25 | public class AdapterLoadException extends Exception { 26 | 27 | public AdapterLoadException() { 28 | } 29 | 30 | public AdapterLoadException(String message) { 31 | super(message); 32 | } 33 | 34 | public AdapterLoadException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | 38 | public AdapterLoadException(Throwable cause) { 39 | super(cause); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/UnsupportedVersionEditException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.bukkit.adapter; 21 | 22 | import com.sk89q.worldedit.WorldEditException; 23 | import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; 24 | 25 | public class UnsupportedVersionEditException extends WorldEditException { 26 | public UnsupportedVersionEditException() { 27 | super(TranslatableComponent.of("worldedit.bukkit.no-edit-without-adapter")); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-bukkit/src/main/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | name: WorldEdit 2 | main: com.sk89q.worldedit.bukkit.WorldEditPlugin 3 | version: "${internalVersion}" 4 | load: STARTUP 5 | api-version: 1.21.3 6 | softdepend: [Vault] 7 | author: EngineHub 8 | website: https://enginehub.org/worldedit -------------------------------------------------------------------------------- /worldedit-bukkit/src/test/java/com/sk89q/worldedit/bukkit/BukkitWorldTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.bukkit; 21 | 22 | import com.sk89q.worldedit.util.TreeGenerator; 23 | import org.junit.jupiter.api.Test; 24 | 25 | import static org.junit.jupiter.api.Assertions.assertNotNull; 26 | 27 | public class BukkitWorldTest { 28 | 29 | @Test 30 | public void testTreeTypeMapping() { 31 | for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) { 32 | assertNotNull(BukkitWorld.toBukkitTreeType(type), "No mapping for: " + type); 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-cli/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar 2 | 3 | plugins { 4 | `java-library` 5 | id("buildlogic.platform") 6 | } 7 | 8 | platform { 9 | kind = buildlogic.WorldEditKind.Standalone("com.sk89q.worldedit.cli.CLIWorldEdit") 10 | extraAttributes = mapOf( 11 | // We don't have any multi-release stuff, but Log4J does. 12 | "Multi-Release" to "true", 13 | ) 14 | } 15 | 16 | dependencies { 17 | "compileOnly"(project(":worldedit-libs:core:ap")) 18 | "annotationProcessor"(project(":worldedit-libs:core:ap")) 19 | "annotationProcessor"(libs.guava) 20 | "api"(project(":worldedit-core")) 21 | "implementation"(platform(libs.log4j.bom)) 22 | "implementation"(libs.log4j.api) 23 | "implementation"(libs.log4j.core) 24 | "implementation"(libs.commonsCli) 25 | "implementation"(libs.guava) 26 | "implementation"(libs.gson) 27 | } 28 | 29 | tasks.named("shadowJar") { 30 | dependencies { 31 | include { true } 32 | } 33 | minimize { 34 | exclude(dependency("org.apache.logging.log4j:log4j-core")) 35 | } 36 | } 37 | 38 | tasks.named("assemble").configure { 39 | dependsOn("shadowJar") 40 | } 41 | 42 | configure { 43 | publications.named("maven") { 44 | artifactId = the().archivesName.get() 45 | from(components["java"]) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.cli; 21 | 22 | import com.sk89q.worldedit.util.PropertiesConfiguration; 23 | 24 | import java.nio.file.Path; 25 | 26 | public class CLIConfiguration extends PropertiesConfiguration { 27 | 28 | public CLIConfiguration(CLIWorldEdit app) { 29 | super(app.getWorkingDir().resolve("worldedit.properties")); 30 | } 31 | 32 | @Override 33 | protected void loadExtra() { 34 | } 35 | 36 | @Override 37 | public Path getWorkingDirectoryPath() { 38 | return CLIWorldEdit.inst.getWorkingDir(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIWorld.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.cli; 21 | 22 | public interface CLIWorld { 23 | 24 | /** 25 | * Saves this world back to file if dirty or forced. 26 | * 27 | * @param force Force a save 28 | */ 29 | void save(boolean force); 30 | 31 | /** 32 | * Gets whether the world is dirty. 33 | * 34 | * @return If it's dirty 35 | */ 36 | boolean isDirty(); 37 | 38 | /** 39 | * Set the world's dirty status. 40 | * 41 | * @param dirty if dirty 42 | */ 43 | void setDirty(boolean dirty); 44 | } 45 | -------------------------------------------------------------------------------- /worldedit-cli/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /worldedit-core/doctools/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("jvm") version "1.9.23" 3 | application 4 | id("buildlogic.common") 5 | } 6 | 7 | application.mainClass.set("com.sk89q.worldedit.internal.util.DocumentationPrinter") 8 | tasks.named("run") { 9 | workingDir = rootProject.projectDir 10 | } 11 | 12 | dependencies { 13 | "implementation"(project(":worldedit-libs:core:ap")) 14 | "implementation"(project(":worldedit-core")) 15 | "implementation"(kotlin("stdlib-jdk8")) 16 | "implementation"(kotlin("reflect")) 17 | "implementation"(libs.guava) 18 | } 19 | -------------------------------------------------------------------------------- /worldedit-core/doctools/src/main/kotlin/com/sk89q/worldedit/internal/util/DocumentationConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.util 21 | 22 | import com.sk89q.worldedit.LocalConfiguration 23 | 24 | object DocumentationConfiguration : LocalConfiguration() { 25 | override fun load() { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/jnbt/EndTag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.jnbt; 21 | 22 | import org.enginehub.linbus.tree.LinEndTag; 23 | 24 | /** 25 | * The {@code TAG_End} tag. 26 | * 27 | * @deprecated Use {@link LinEndTag}. 28 | */ 29 | @Deprecated 30 | public final class EndTag extends Tag { 31 | public EndTag() { 32 | super(LinEndTag.instance()); 33 | } 34 | 35 | @Override 36 | public Object getValue() { 37 | return super.getValue(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandPermissionsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.minecraft.util.commands; 21 | 22 | /** 23 | * Thrown when not enough permissions are satisfied. 24 | */ 25 | @Deprecated 26 | public class CommandPermissionsException extends CommandException { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandUsageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.minecraft.util.commands; 21 | 22 | @Deprecated 23 | public class CommandUsageException extends CommandException { 24 | 25 | protected String usage; 26 | 27 | public CommandUsageException(String message, String usage) { 28 | super(message); 29 | this.usage = usage; 30 | } 31 | 32 | public String getUsage() { 33 | return usage; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/Console.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.minecraft.util.commands; 21 | 22 | import java.lang.annotation.Retention; 23 | import java.lang.annotation.RetentionPolicy; 24 | 25 | /** 26 | * This annotation indicates that a command can be used from the console. 27 | */ 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Deprecated 30 | public @interface Console { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/MissingNestedCommandException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.minecraft.util.commands; 21 | 22 | @Deprecated 23 | public class MissingNestedCommandException extends CommandUsageException { 24 | 25 | public MissingNestedCommandException(String message, String usage) { 26 | super(message, usage); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/UnhandledCommandException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.minecraft.util.commands; 21 | 22 | @Deprecated 23 | public class UnhandledCommandException extends CommandException { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/WrappedCommandException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.minecraft.util.commands; 21 | 22 | @Deprecated 23 | public class WrappedCommandException extends CommandException { 24 | 25 | public WrappedCommandException(Throwable t) { 26 | super(t); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** 21 | * This package contains the old command system. It is no longer in use. Please switch 22 | * to Piston, Intake, ACF, or similar systems. 23 | */ 24 | package com.sk89q.minecraft.util.commands; 25 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.util.yaml; 21 | 22 | import org.yaml.snakeyaml.DumperOptions.FlowStyle; 23 | 24 | public enum YAMLFormat { 25 | EXTENDED(FlowStyle.BLOCK), 26 | COMPACT(FlowStyle.AUTO); 27 | 28 | private final FlowStyle style; 29 | 30 | YAMLFormat(FlowStyle style) { 31 | this.style = style; 32 | } 33 | 34 | public FlowStyle getStyle() { 35 | return style; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/util/yaml/YAMLProcessorException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.util.yaml; 21 | 22 | /** 23 | * YAMLProcessor exception. 24 | */ 25 | public class YAMLProcessorException extends Exception { 26 | 27 | public YAMLProcessorException() { 28 | super(); 29 | } 30 | 31 | public YAMLProcessorException(String msg) { 32 | super(msg); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/EmptyClipboardException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit; 21 | 22 | /** 23 | * Thrown when there is no clipboard set. 24 | */ 25 | public class EmptyClipboardException extends WorldEditException { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/IncompleteRegionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit; 21 | 22 | /** 23 | * Raised when a region is not fully defined. 24 | */ 25 | public class IncompleteRegionException extends WorldEditException { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/InvalidItemException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit; 21 | 22 | /** 23 | * Thrown when an invalid item is specified. 24 | */ 25 | @Deprecated 26 | public class InvalidItemException extends DisallowedItemException { 27 | 28 | public InvalidItemException(String type, String message) { 29 | super(type, message); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/MaxBrushRadiusException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit; 21 | 22 | /** 23 | * Thrown when a maximum radius for a brush is reached. 24 | */ 25 | public class MaxBrushRadiusException extends MaxRadiusException { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/MaxRadiusException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit; 21 | 22 | /** 23 | * Thrown when a maximum radius is reached, such as, for example, 24 | * in the case of a sphere command. 25 | */ 26 | public class MaxRadiusException extends WorldEditException { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/MissingWorldException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit; 21 | 22 | import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; 23 | 24 | /** 25 | * Raised when a world is missing but is required. 26 | */ 27 | public class MissingWorldException extends WorldEditException { 28 | 29 | public MissingWorldException() { 30 | super(TranslatableComponent.of("worldedit.error.missing-world")); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/blocks/TileEntityBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.blocks; 21 | 22 | import com.sk89q.worldedit.world.NbtValued; 23 | 24 | /** 25 | * Indicates a block that contains extra data identified as an NBT structure. 26 | * Compared to a {@link NbtValued}, tile entity blocks also contain an ID. 27 | * 28 | * @see NbtValued 29 | */ 30 | public interface TileEntityBlock extends NbtValued { 31 | 32 | /** 33 | * Return the name of the title entity ID. 34 | * 35 | * @return tile entity ID, non-null string 36 | */ 37 | String getNbtId(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/InsufficientArgumentsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.command; 21 | 22 | import com.sk89q.worldedit.WorldEditException; 23 | import com.sk89q.worldedit.util.formatting.text.Component; 24 | 25 | public class InsufficientArgumentsException extends WorldEditException { 26 | 27 | @Deprecated 28 | public InsufficientArgumentsException(String error) { 29 | super(error); 30 | } 31 | 32 | public InsufficientArgumentsException(Component error) { 33 | super(error); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/Arguments.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.command.argument; 21 | 22 | 23 | import org.enginehub.piston.inject.InjectedValueAccess; 24 | 25 | /** 26 | * Key-interface for {@link InjectedValueAccess} for the String arguments. 27 | */ 28 | public interface Arguments { 29 | 30 | String get(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/SelectorChoiceList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.command.argument; 21 | 22 | public final class SelectorChoiceList implements SelectorChoiceOrList { 23 | public static final SelectorChoiceList INSTANCE = new SelectorChoiceList(); 24 | 25 | private SelectorChoiceList() { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/SelectorChoiceOrList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.command.argument; 21 | 22 | public sealed interface SelectorChoiceOrList permits SelectorChoice, SelectorChoiceList { 23 | } 24 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | @org.enginehub.piston.util.NonnullByDefault 21 | package com.sk89q.worldedit.command.argument; 22 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/Tool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.command.tool; 21 | 22 | import com.sk89q.worldedit.extension.platform.Actor; 23 | 24 | /** 25 | * Represents a tool. This interface alone defines nothing. A tool also 26 | * has to implement {@code BlockTool} or {@code TraceTool}. 27 | */ 28 | public interface Tool { 29 | 30 | /** 31 | * Checks to see if the player can still be using this tool (considering 32 | * permissions and such). 33 | * 34 | * @param actor the actor 35 | * @return true if use is permitted 36 | */ 37 | boolean canUse(Actor actor); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/command/util/HookMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.command.util; 21 | 22 | public enum HookMode { 23 | ACTIVE, INACTIVE 24 | } 25 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/AbstractCancellable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event; 21 | 22 | /** 23 | * An abstract implementation of {@link Cancellable} that has all 24 | * of {@link Cancellable}'s methods implemented. 25 | */ 26 | public abstract class AbstractCancellable implements Cancellable { 27 | 28 | private boolean cancelled; 29 | 30 | @Override 31 | public boolean isCancelled() { 32 | return cancelled; 33 | } 34 | 35 | @Override 36 | public void setCancelled(boolean cancelled) { 37 | this.cancelled = cancelled; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/Cancellable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event; 21 | 22 | /** 23 | * Marks an event that has a cancellable state. The meaning of cancellation 24 | * depends on the event. 25 | */ 26 | public interface Cancellable { 27 | 28 | /** 29 | * Returns whether the event has been cancelled. 30 | * 31 | * @return true if cancelled 32 | */ 33 | boolean isCancelled(); 34 | 35 | /** 36 | * Set whether the event has been cancelled. 37 | * 38 | * @param cancelled true if cancelled 39 | */ 40 | void setCancelled(boolean cancelled); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event; 21 | 22 | /** 23 | * An abstract base class for all WorldEdit events. 24 | */ 25 | public abstract class Event { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/InputType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | /** 23 | * The type of input sent. 24 | */ 25 | public enum InputType { 26 | 27 | /** 28 | * Left click. 29 | */ 30 | PRIMARY, 31 | 32 | /** 33 | * Right click. 34 | */ 35 | SECONDARY 36 | 37 | } 38 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/Interaction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | /** 23 | * The type of interaction. 24 | */ 25 | public enum Interaction { 26 | 27 | /** 28 | * Refers to primary input usage (left click). 29 | */ 30 | HIT, 31 | 32 | /** 33 | * Refers to secondary input usage (right click). 34 | */ 35 | OPEN 36 | 37 | } 38 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | import com.sk89q.worldedit.event.Event; 23 | import com.sk89q.worldedit.extension.platform.Platform; 24 | 25 | public abstract class PlatformEvent extends Event { 26 | private final Platform platform; 27 | 28 | protected PlatformEvent(Platform platform) { 29 | this.platform = platform; 30 | } 31 | 32 | /** 33 | * Get the platform for this event. 34 | * 35 | * @return the platform 36 | */ 37 | public Platform getPlatform() { 38 | return platform; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformInitializeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | import com.sk89q.worldedit.event.Event; 23 | 24 | /** 25 | * Fired when configuration has been loaded and the platform is in the 26 | * initialization stage. 27 | * 28 | *

This event is fired once.

29 | */ 30 | public class PlatformInitializeEvent extends Event { 31 | } 32 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformReadyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | import com.sk89q.worldedit.extension.platform.Platform; 23 | 24 | /** 25 | * Raised when a platform has finished loading its data. 26 | */ 27 | public class PlatformReadyEvent extends PlatformEvent { 28 | public PlatformReadyEvent(Platform platform) { 29 | super(platform); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformUnreadyEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | import com.sk89q.worldedit.extension.platform.Platform; 23 | 24 | /** 25 | * Raised when a platform needs to retract all registered data, e.g. due to a reload. 26 | */ 27 | public class PlatformUnreadyEvent extends PlatformEvent { 28 | public PlatformUnreadyEvent(Platform platform) { 29 | super(platform); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformsRegisteredEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.event.platform; 21 | 22 | import com.sk89q.worldedit.event.Event; 23 | 24 | /** 25 | * Fired by a platform when it believes all available platforms should be registered. 26 | */ 27 | public class PlatformsRegisteredEvent extends Event { 28 | } 29 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Annotations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extension.platform; 21 | 22 | import com.google.auto.value.AutoAnnotation; 23 | import com.sk89q.worldedit.internal.annotation.Radii; 24 | 25 | /** 26 | * Holder for generated annotation classes. 27 | */ 28 | class Annotations { 29 | 30 | @AutoAnnotation 31 | static Radii radii(int value) { 32 | return new AutoAnnotation_Annotations_radii(value); 33 | } 34 | 35 | private Annotations() { 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/MultiUserPlatform.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extension.platform; 21 | 22 | import java.util.Collection; 23 | 24 | /** 25 | * Implements a platform with multiple connected users. 26 | */ 27 | public interface MultiUserPlatform extends Platform { 28 | 29 | /** 30 | * Get a list of connected users. 31 | * 32 | * @return a list of connected users 33 | */ 34 | Collection getConnectedUsers(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Watchdog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extension.platform; 21 | 22 | /** 23 | * Interface to a {@link Platform}'s watchdog service. 24 | */ 25 | public interface Watchdog { 26 | 27 | void tick(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/permission/OverridePermissions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extension.platform.permission; 21 | 22 | /** 23 | * Standard override permissions. 24 | */ 25 | public final class OverridePermissions { 26 | 27 | public static final String NO_LIMITS = "worldedit.limit.unrestricted"; 28 | 29 | private OverridePermissions() { 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/share/ClipboardShareMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extent.clipboard.io.share; 21 | 22 | import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat; 23 | 24 | /** 25 | * Items of metadata about shared clipboards. 26 | * 27 | * @param format the format of the clipboard 28 | * @param name the name of the clipboard 29 | * @param author the author of the clipboard 30 | */ 31 | public record ClipboardShareMetadata(ClipboardFormat format, String name, String author) { 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/sponge/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** 21 | * This package is internal, containing implementation details of the Sponge Schematic 22 | * Specification. Use the {@link com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats} or 23 | * {@link com.sk89q.worldedit.extent.clipboard.io.BuiltInClipboardFormat} classes to 24 | * acquire readers and writers instead. 25 | */ 26 | package com.sk89q.worldedit.extent.clipboard.io.sponge; 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extent/inventory/BlockBagException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extent.inventory; 21 | 22 | /** 23 | * Thrown when a block bag detects a problem. 24 | */ 25 | public class BlockBagException extends Exception { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extent/inventory/OutOfBlocksException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extent.inventory; 21 | 22 | /** 23 | * Thrown when there are no more blocks left. 24 | */ 25 | public class OutOfBlocksException extends BlockBagException { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extent/inventory/UnplaceableBlockException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extent.inventory; 21 | 22 | /** 23 | * Thrown when a block that can't be placed is used. 24 | */ 25 | public class UnplaceableBlockException extends BlockBagException { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/ReorderingExtent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.extent.reorder; 21 | 22 | import com.sk89q.worldedit.extent.Extent; 23 | 24 | /** 25 | * An interface for {@link Extent}s that are meant to reorder changes so 26 | * that they are more successful. 27 | * 28 | *

For example, torches in Minecraft need to be placed on a block. A smart 29 | * reordering implementation might place the torch after the block has 30 | * been placed.

31 | */ 32 | public interface ReorderingExtent extends Extent { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/Contextual.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function; 21 | 22 | public interface Contextual { 23 | 24 | T createFromContext(EditContext context); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/EntityFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function; 21 | 22 | import com.sk89q.worldedit.WorldEditException; 23 | import com.sk89q.worldedit.entity.Entity; 24 | 25 | /** 26 | * Applies a function to entities. 27 | */ 28 | public interface EntityFunction { 29 | 30 | /** 31 | * Apply the function to the entity. 32 | * 33 | * @param entity the entity 34 | * @return true if something was changed 35 | * @throws WorldEditException thrown on an error 36 | */ 37 | boolean apply(Entity entity) throws WorldEditException; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/AbstractMask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function.mask; 21 | 22 | /** 23 | * A base class of {@link Mask} that all masks should inherit from. 24 | */ 25 | public abstract class AbstractMask implements Mask { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/AbstractMask2D.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function.mask; 21 | 22 | /** 23 | * A base class of {@link Mask2D} that all masks should inherit from. 24 | */ 25 | public abstract class AbstractMask2D implements Mask2D { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Mask2D.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function.mask; 21 | 22 | import com.sk89q.worldedit.math.BlockVector2; 23 | 24 | /** 25 | * Tests whether a given vector meets a criteria. 26 | */ 27 | public interface Mask2D { 28 | 29 | /** 30 | * Returns true if the criteria is met. 31 | * 32 | * @param vector the vector to test 33 | * @return true if the criteria is met 34 | */ 35 | boolean test(BlockVector2 vector); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/RunContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function.operation; 21 | 22 | /** 23 | * Describes the current run. 24 | */ 25 | public class RunContext { 26 | 27 | /** 28 | * Return whether the current operation should still continue running. 29 | * 30 | *

This method can be called frequently.

31 | * 32 | * @return true if the operation should continue running 33 | */ 34 | public boolean shouldContinue() { 35 | return true; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/pattern/AbstractPattern.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function.pattern; 21 | 22 | /** 23 | * An abstract implementation for {@link Pattern}s. 24 | */ 25 | public abstract class AbstractPattern implements Pattern { 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/function/pattern/ExtentPattern.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.function.pattern; 21 | 22 | import com.sk89q.worldedit.extent.Extent; 23 | 24 | public interface ExtentPattern extends Pattern { 25 | 26 | /** 27 | * Get the extent associated with this pattern. 28 | * 29 | * @return the extent for this pattern 30 | */ 31 | Extent getExtent(); 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/Selection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.annotation; 21 | 22 | import org.enginehub.piston.inject.InjectAnnotation; 23 | 24 | import java.lang.annotation.ElementType; 25 | import java.lang.annotation.Retention; 26 | import java.lang.annotation.RetentionPolicy; 27 | import java.lang.annotation.Target; 28 | 29 | /** 30 | * Indicates that this value should come from the current selection. 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.PARAMETER) 34 | @InjectAnnotation 35 | public @interface Selection { 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/VertHeight.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.annotation; 21 | 22 | import org.enginehub.piston.inject.InjectAnnotation; 23 | 24 | import java.lang.annotation.ElementType; 25 | import java.lang.annotation.Retention; 26 | import java.lang.annotation.RetentionPolicy; 27 | import java.lang.annotation.Target; 28 | 29 | /** 30 | * Indicates that this value is for holding the vertical height. 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.PARAMETER) 34 | @InjectAnnotation 35 | public @interface VertHeight { 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionMatch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.command.exception; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * Denotes a match of an exception. 29 | */ 30 | @Target(ElementType.METHOD) 31 | @Retention(RetentionPolicy.RUNTIME) 32 | public @interface ExceptionMatch { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/CUIEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.cui; 21 | 22 | public interface CUIEvent { 23 | 24 | String getTypeId(); 25 | 26 | String[] getParameters(); 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/SelectionShapeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.cui; 21 | 22 | public class SelectionShapeEvent implements CUIEvent { 23 | 24 | protected final String shapeName; 25 | 26 | public SelectionShapeEvent(String shapeName) { 27 | this.shapeName = shapeName; 28 | } 29 | 30 | @Override 31 | public String getTypeId() { 32 | return "s"; 33 | } 34 | 35 | @Override 36 | public String[] getParameters() { 37 | return new String[] { shapeName }; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/CompiledExpression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.expression; 21 | 22 | /** 23 | * Represents a "compiled" expression. 24 | */ 25 | public interface CompiledExpression { 26 | 27 | Double execute(ExecutionData executionData); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/ExpressionFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.expression; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | @Retention(RetentionPolicy.RUNTIME) 28 | @Target(ElementType.METHOD) 29 | public @interface ExpressionFunction { 30 | } 31 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/ExpressionTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.expression; 21 | 22 | /** 23 | * Thrown when an evaluation exceeds the timeout time. 24 | */ 25 | public class ExpressionTimeoutException extends EvaluationException { 26 | public ExpressionTimeoutException(String message) { 27 | super(-1, message); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/LexerErrorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.expression; 21 | 22 | import org.antlr.v4.runtime.BaseErrorListener; 23 | import org.antlr.v4.runtime.RecognitionException; 24 | import org.antlr.v4.runtime.Recognizer; 25 | 26 | class LexerErrorListener extends BaseErrorListener { 27 | @Override 28 | public void syntaxError(Recognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { 29 | throw new LexerException(charPositionInLine, msg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/ParserErrorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.expression; 21 | 22 | import org.antlr.v4.runtime.BaseErrorListener; 23 | import org.antlr.v4.runtime.RecognitionException; 24 | import org.antlr.v4.runtime.Recognizer; 25 | 26 | class ParserErrorListener extends BaseErrorListener { 27 | @Override 28 | public void syntaxError(Recognizer recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { 29 | throw new ParserException(charPositionInLine, msg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExecNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.internal.expression.invoke; 21 | 22 | import java.lang.invoke.MethodHandle; 23 | 24 | record ExecNode(int positionInLine, MethodHandle handle) { 25 | } 26 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/internal/wna/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** 21 | * "WNA", or WorldEdit Native Access. 22 | * 23 | *

24 | * Contains internal helper functions for sharing code between platforms. 25 | *

26 | */ 27 | package com.sk89q.worldedit.internal.wna; 28 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/math/RegionOptimizedComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.math; 21 | 22 | import java.util.Comparator; 23 | 24 | /** 25 | * Sort block positions by region, chunk, and finally Y-Z-X. 26 | */ 27 | public class RegionOptimizedComparator { 28 | 29 | public static final Comparator INSTANCE 30 | = RegionOptimizedChunkComparator.INSTANCE 31 | .thenComparing(BlockVector3.sortByCoordsYzx()); 32 | 33 | private RegionOptimizedComparator() { 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/regions/AbstractFlatRegion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.regions; 21 | 22 | import com.sk89q.worldedit.world.World; 23 | 24 | public abstract class AbstractFlatRegion extends AbstractRegion implements FlatRegion { 25 | 26 | protected AbstractFlatRegion(World world) { 27 | super(world); 28 | } 29 | 30 | @Override 31 | public int getMinimumY() { 32 | return getMinimumPoint().y(); 33 | } 34 | 35 | @Override 36 | public int getMaximumY() { 37 | return getMaximumPoint().y(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/regions/RegionOperationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.regions; 21 | 22 | import com.sk89q.worldedit.WorldEditException; 23 | import com.sk89q.worldedit.util.formatting.text.Component; 24 | 25 | public class RegionOperationException extends WorldEditException { 26 | 27 | @Deprecated 28 | public RegionOperationException(String msg) { 29 | super(msg); 30 | } 31 | 32 | public RegionOperationException(Component msg) { 33 | super(msg); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/regions/factory/CuboidRegionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.regions.factory; 21 | 22 | import com.sk89q.worldedit.math.BlockVector3; 23 | import com.sk89q.worldedit.regions.CuboidRegion; 24 | import com.sk89q.worldedit.regions.Region; 25 | 26 | public class CuboidRegionFactory implements RegionFactory { 27 | 28 | @Override 29 | public Region createCenteredAt(BlockVector3 position, double size) { 30 | return CuboidRegion.fromCenter(position, (int) size); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/regions/factory/RegionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.regions.factory; 21 | 22 | import com.sk89q.worldedit.math.BlockVector3; 23 | import com.sk89q.worldedit.regions.Region; 24 | 25 | public interface RegionFactory { 26 | 27 | Region createCenteredAt(BlockVector3 position, double size); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/regions/factory/SphereRegionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.regions.factory; 21 | 22 | import com.sk89q.worldedit.math.BlockVector3; 23 | import com.sk89q.worldedit.math.Vector3; 24 | import com.sk89q.worldedit.regions.EllipsoidRegion; 25 | import com.sk89q.worldedit.regions.Region; 26 | 27 | public class SphereRegionFactory implements RegionFactory { 28 | 29 | @Override 30 | public Region createCenteredAt(BlockVector3 position, double size) { 31 | return new EllipsoidRegion(position, Vector3.at(size, size, size)); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/scripting/CraftScriptEngine.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.scripting; 21 | 22 | import java.util.Map; 23 | import javax.script.ScriptException; 24 | 25 | public interface CraftScriptEngine { 26 | void setTimeLimit(int milliseconds); 27 | 28 | int getTimeLimit(); 29 | 30 | Object evaluate(String script, String filename, Map args) 31 | throws ScriptException, Throwable; 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/scripting/MinecraftHidingClassShutter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.scripting; 21 | 22 | import org.mozilla.javascript.ClassShutter; 23 | 24 | /** 25 | * Hides Minecraft's obfuscated names from scripts. 26 | */ 27 | class MinecraftHidingClassShutter implements ClassShutter { 28 | @Override 29 | public boolean visibleToScripts(String fullClassName) { 30 | return fullClassName.contains(".") || fullClassName.length() >= 4; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/session/MissingSessionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.session; 21 | 22 | /** 23 | * Raised when the session is missing. 24 | */ 25 | public class MissingSessionException extends Exception { 26 | 27 | public MissingSessionException() { 28 | } 29 | 30 | public MissingSessionException(String message) { 31 | super(message); 32 | } 33 | 34 | public MissingSessionException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | 38 | public MissingSessionException(Throwable cause) { 39 | super(cause); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionOwner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.session; 21 | 22 | import com.sk89q.worldedit.util.auth.Subject; 23 | 24 | /** 25 | * An object that owns a session. 26 | */ 27 | public interface SessionOwner extends Subject { 28 | 29 | /** 30 | * Get an object describing this session. 31 | * 32 | * @return the status object 33 | */ 34 | SessionKey getSessionKey(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/session/storage/VoidStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.session.storage; 21 | 22 | import com.sk89q.worldedit.LocalSession; 23 | 24 | import java.io.IOException; 25 | import java.util.UUID; 26 | 27 | /** 28 | * A session store that doesn't know how to store sessions. 29 | */ 30 | public class VoidStore implements SessionStore { 31 | 32 | @Override 33 | public LocalSession load(UUID id) throws IOException { 34 | return new LocalSession(); 35 | } 36 | 37 | @Override 38 | public void save(UUID id, LocalSession session) throws IOException { 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/GuavaUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util; 21 | 22 | import javax.annotation.Nullable; 23 | 24 | import static com.google.common.base.Preconditions.checkNotNull; 25 | 26 | public final class GuavaUtil { 27 | 28 | private GuavaUtil() { 29 | } 30 | 31 | public static T firstNonNull(@Nullable T first, @Nullable T second) { 32 | return first != null ? first : checkNotNull(second); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/HandSide.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util; 21 | 22 | public enum HandSide { 23 | MAIN_HAND, 24 | OFF_HAND 25 | } 26 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/Identifiable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util; 21 | 22 | import java.util.UUID; 23 | 24 | /** 25 | * Represents an object that can be identified by a UUID. 26 | */ 27 | public interface Identifiable { 28 | 29 | /** 30 | * Get the UUID for this object. 31 | * 32 | * @return the UUID 33 | */ 34 | UUID getUniqueId(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/InvalidComponentException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.formatting.component; 21 | 22 | import com.sk89q.worldedit.WorldEditException; 23 | import com.sk89q.worldedit.util.formatting.text.Component; 24 | 25 | public class InvalidComponentException extends WorldEditException { 26 | 27 | @Deprecated 28 | public InvalidComponentException(String message) { 29 | super(message); 30 | } 31 | 32 | public InvalidComponentException(Component message) { 33 | super(message); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/io/WorldEditResourceLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.io; 21 | 22 | import com.sk89q.worldedit.WorldEdit; 23 | 24 | import java.nio.file.Path; 25 | 26 | public class WorldEditResourceLoader implements ResourceLoader { 27 | 28 | private final WorldEdit worldEdit; 29 | 30 | public WorldEditResourceLoader(WorldEdit worldEdit) { 31 | this.worldEdit = worldEdit; 32 | } 33 | 34 | @Override 35 | public Path getLocalResource(String pathName) { 36 | return this.worldEdit.getWorkingDirectoryPath(pathName); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/ArchiveDir.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.io.file; 21 | 22 | import java.io.Closeable; 23 | import java.nio.file.Path; 24 | 25 | /** 26 | * Represents an archive opened as a directory. This must be closed after work on the Path is 27 | * done. 28 | */ 29 | public interface ArchiveDir extends Closeable { 30 | 31 | Path getPath(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/AttributeTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.io.file; 21 | 22 | public enum AttributeTarget { 23 | FILE, DIRECTORY 24 | } 25 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/FileSelectionAbortedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.io.file; 21 | 22 | import com.sk89q.worldedit.util.formatting.text.Component; 23 | 24 | public class FileSelectionAbortedException extends FilenameException { 25 | 26 | public FileSelectionAbortedException() { 27 | super(""); 28 | } 29 | 30 | @Deprecated 31 | public FileSelectionAbortedException(String msg) { 32 | super("", msg); 33 | } 34 | 35 | public FileSelectionAbortedException(Component msg) { 36 | super("", msg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/lifecycle/Token.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.lifecycle; 21 | 22 | /** 23 | * Used to create a new strong reference to an object that can be separately dropped. 24 | * 25 | * @param the inner object 26 | */ 27 | class Token { 28 | final T inner; 29 | 30 | Token(T inner) { 31 | this.inner = inner; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/paste/PasteMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.paste; 21 | 22 | public class PasteMetadata { 23 | public String name; 24 | public String extension; 25 | public String author; 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/paste/Paster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.paste; 21 | 22 | import java.net.URL; 23 | import java.util.concurrent.Callable; 24 | 25 | public interface Paster { 26 | 27 | default Callable paste(String content) { 28 | return paste(content, new PasteMetadata()); 29 | } 30 | 31 | Callable paste(String content, PasteMetadata metadata); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/report/ConfigReport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.report; 21 | 22 | import com.sk89q.worldedit.WorldEdit; 23 | 24 | public class ConfigReport extends DataReport { 25 | 26 | public ConfigReport() { 27 | super("WorldEdit Configuration"); 28 | 29 | append("Configuration", new HierarchyObjectReport("Configuration", WorldEdit.getInstance().getConfiguration())); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/report/HierarchyObjectReport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.report; 21 | 22 | public class HierarchyObjectReport extends ShallowObjectReport { 23 | 24 | public HierarchyObjectReport(String title, Object object) { 25 | super(title, object); 26 | 27 | Class type = object.getClass(); 28 | while ((type = type.getSuperclass()) != null) { 29 | scanClass(object, type); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/report/Report.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.report; 21 | 22 | public interface Report { 23 | 24 | String getTitle(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/report/Unreported.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.report; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * Annotates properties that should not be exposed in the report. 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target(ElementType.FIELD) 32 | public @interface Unreported { 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/task/Supervisor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.task; 21 | 22 | import java.util.List; 23 | 24 | /** 25 | * Manages running tasks and informs users of their progress, but does not 26 | * execute the task. 27 | */ 28 | public interface Supervisor { 29 | 30 | /** 31 | * Get a list of running or queued tasks. 32 | * 33 | * @return a list of tasks 34 | */ 35 | List> getTasks(); 36 | 37 | /** 38 | * Monitor the given task. 39 | * 40 | * @param task the task 41 | */ 42 | void monitor(Task task); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/task/TaskStateComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.task; 21 | 22 | import java.util.Comparator; 23 | 24 | /** 25 | * Compares task states according to the order of the {@link Task.State} 26 | * enumeration. 27 | */ 28 | public class TaskStateComparator implements Comparator> { 29 | 30 | @Override 31 | public int compare(com.sk89q.worldedit.util.task.Task o1, Task o2) { 32 | return Integer.compare(o1.getState().ordinal(), o2.getState().ordinal()); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/util/task/progress/ProgressObservable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.task.progress; 21 | 22 | /** 23 | * An object that is able to report on its progress. 24 | */ 25 | public interface ProgressObservable { 26 | 27 | /** 28 | * Get the current percentage of completion. 29 | * 30 | * @return a progress object 31 | */ 32 | Progress getProgress(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/DataException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world; 21 | 22 | /** 23 | * Thrown when there is an exception related to data handling. 24 | */ 25 | public class DataException extends Exception { 26 | 27 | public DataException(String msg) { 28 | super(msg); 29 | } 30 | 31 | public DataException() { 32 | super(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/WorldUnloadedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world; 21 | 22 | import com.sk89q.worldedit.WorldEditException; 23 | import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; 24 | 25 | /** 26 | * Thrown if the world has been unloaded. 27 | */ 28 | public class WorldUnloadedException extends WorldEditException { 29 | 30 | /** 31 | * Create a new instance. 32 | */ 33 | public WorldUnloadedException() { 34 | super(TranslatableComponent.of("worldedit.error.world-unloaded")); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/Chunk.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.chunk; 21 | 22 | import com.sk89q.worldedit.math.BlockVector3; 23 | import com.sk89q.worldedit.world.DataException; 24 | import com.sk89q.worldedit.world.block.BaseBlock; 25 | 26 | /** 27 | * A 16 by 16 block chunk. 28 | */ 29 | public interface Chunk { 30 | 31 | /** 32 | * Get a block. 33 | * 34 | * @param position the position of the block 35 | * @return block the block 36 | * @throws DataException thrown on data error 37 | */ 38 | BaseBlock getBlock(BlockVector3 position) throws DataException; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/generation/ConfiguredFeatureType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.generation; 21 | 22 | import com.sk89q.worldedit.registry.Keyed; 23 | import com.sk89q.worldedit.registry.NamespacedRegistry; 24 | 25 | public record ConfiguredFeatureType(String id) implements Keyed { 26 | public static final NamespacedRegistry REGISTRY = new NamespacedRegistry<>("configured feature type"); 27 | 28 | @Override 29 | public String toString() { 30 | return this.id; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/generation/StructureType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.generation; 21 | 22 | import com.sk89q.worldedit.registry.Keyed; 23 | import com.sk89q.worldedit.registry.NamespacedRegistry; 24 | 25 | public record StructureType(String id) implements Keyed { 26 | public static final NamespacedRegistry REGISTRY = new NamespacedRegistry<>("structure type"); 27 | 28 | @Override 29 | public String toString() { 30 | return this.id; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BlockCategoryRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | import com.sk89q.worldedit.world.block.BlockType; 23 | 24 | /** 25 | * A registry for BlockType categories. 26 | */ 27 | public interface BlockCategoryRegistry extends CategoryRegistry { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/EntityRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | import com.sk89q.worldedit.entity.BaseEntity; 23 | 24 | import javax.annotation.Nullable; 25 | 26 | /** 27 | * Provides information on entities. 28 | */ 29 | public interface EntityRegistry { 30 | 31 | /** 32 | * Create a new entity using its ID. 33 | * 34 | * @param id the id 35 | * @return the entity, which may be null if the entity does not exist 36 | */ 37 | @Nullable 38 | BaseEntity createFromId(String id); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/ItemCategoryRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | import com.sk89q.worldedit.world.item.ItemType; 23 | 24 | /** 25 | * A registry for ItemType categories. 26 | */ 27 | public interface ItemCategoryRegistry extends CategoryRegistry { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullBlockCategoryRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | import com.sk89q.worldedit.world.block.BlockType; 23 | 24 | import java.util.Collections; 25 | import java.util.Set; 26 | 27 | public class NullBlockCategoryRegistry implements BlockCategoryRegistry { 28 | 29 | @Override 30 | public Set getCategorisedByName(String category) { 31 | return Collections.emptySet(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullEntityRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | import com.sk89q.worldedit.entity.BaseEntity; 23 | 24 | import javax.annotation.Nullable; 25 | 26 | /** 27 | * An implementation of an entity registry that knows nothing. 28 | */ 29 | public class NullEntityRegistry implements EntityRegistry { 30 | 31 | @Nullable 32 | @Override 33 | public BaseEntity createFromId(String id) { 34 | return null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/NullItemCategoryRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | import com.sk89q.worldedit.world.item.ItemType; 23 | 24 | import java.util.Collections; 25 | import java.util.Set; 26 | 27 | public class NullItemCategoryRegistry implements ItemCategoryRegistry { 28 | 29 | @Override 30 | public Set getCategorisedByName(String category) { 31 | return Collections.emptySet(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/SimpleItemMaterial.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.registry; 21 | 22 | public record SimpleItemMaterial(int maxStackSize, int maxDamage) implements ItemMaterial { 23 | } 24 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/InvalidSnapshotException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.snapshot; 21 | 22 | public class InvalidSnapshotException extends Exception { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/ModificationTimerParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.snapshot; 21 | 22 | import java.io.File; 23 | import java.util.Calendar; 24 | import java.util.GregorianCalendar; 25 | 26 | public class ModificationTimerParser implements SnapshotDateParser { 27 | 28 | @Override 29 | public Calendar detectDate(File file) { 30 | Calendar cal = new GregorianCalendar(); 31 | cal.setTimeInMillis(file.lastModified()); 32 | return cal; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/SnapshotDateParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.snapshot; 21 | 22 | import java.io.File; 23 | import java.util.Calendar; 24 | import javax.annotation.Nullable; 25 | 26 | /** 27 | * A name parser attempts to make sense of a filename for a snapshot. 28 | */ 29 | public interface SnapshotDateParser { 30 | 31 | /** 32 | * Attempt to detect a date from a file. 33 | * 34 | * @param file the file 35 | * @return date or null 36 | */ 37 | @Nullable 38 | Calendar detectDate(File file); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/SnapshotComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.snapshot.experimental; 21 | 22 | import java.util.Comparator; 23 | 24 | public class SnapshotComparator { 25 | 26 | private static final Comparator COMPARATOR = 27 | Comparator.comparing(Snapshot::getInfo); 28 | 29 | public static Comparator getInstance() { 30 | return COMPARATOR; 31 | } 32 | 33 | private SnapshotComparator() { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** 21 | * Experimental, in-testing, snapshot API. Do NOT rely on this API in plugin releases, as it will 22 | * move to the existing snapshot package when testing is complete. 23 | * 24 | *

25 | * The existing snapshot API will be removed when this API is made official. It aims to have 100% 26 | * compatibility with old snapshot storage, bar some odd date formats. 27 | *

28 | */ 29 | package com.sk89q.worldedit.world.snapshot.experimental; 30 | // TODO Un-experimentalize when ready. 31 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStoreException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.storage; 21 | 22 | import com.sk89q.worldedit.world.DataException; 23 | 24 | public class ChunkStoreException extends DataException { 25 | 26 | public ChunkStoreException(String msg) { 27 | super(msg); 28 | } 29 | 30 | public ChunkStoreException() { 31 | super(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/InvalidFormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.world.storage; 21 | 22 | import com.sk89q.worldedit.world.DataException; 23 | 24 | public class InvalidFormatException extends DataException { 25 | 26 | public InvalidFormatException(String msg) { 27 | super(msg); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /worldedit-core/src/test/java/com/sk89q/worldedit/util/test/ResourceLockKeys.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.test; 21 | 22 | public class ResourceLockKeys { 23 | public static final String WORLDEDIT_PLATFORM = "WORLDEDIT_PLATFORM"; 24 | 25 | private ResourceLockKeys() { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /worldedit-core/src/test/java/com/sk89q/worldedit/util/test/VariedVectorPair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.util.test; 21 | 22 | import com.sk89q.worldedit.math.BlockVector3; 23 | 24 | public class VariedVectorPair { 25 | public final BlockVector3 first; 26 | public final BlockVector3 second; 27 | 28 | public VariedVectorPair(BlockVector3 first, BlockVector3 second) { 29 | this.first = first; 30 | this.second = second; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /worldedit-core/src/test/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | junit.jupiter.execution.parallel.enabled=true 2 | junit.jupiter.execution.parallel.mode.default=concurrent 3 | junit.jupiter.execution.parallel.mode.classes.default=same_thread 4 | junit.jupiter.execution.parallel.config.strategy=dynamic 5 | junit.jupiter.execution.parallel.config.dynamic.factor=4 6 | 7 | jqwik.tries.default = 10000 8 | -------------------------------------------------------------------------------- /worldedit-core/src/test/resources/world_region.mca.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngineHub/WorldEdit/4b5c5316e7e650bee746eeb797510950d216addf/worldedit-core/src/test/resources/world_region.mca.gzip -------------------------------------------------------------------------------- /worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/internal/ExtendedMinecraftServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.fabric.internal; 21 | 22 | import net.minecraft.world.level.Level; 23 | 24 | import java.nio.file.Path; 25 | 26 | public interface ExtendedMinecraftServer { 27 | 28 | Path getStoragePath(Level world); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /worldedit-fabric/src/main/resources/assets/worldedit/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngineHub/WorldEdit/4b5c5316e7e650bee746eeb797510950d216addf/worldedit-fabric/src/main/resources/assets/worldedit/icon.png -------------------------------------------------------------------------------- /worldedit-fabric/src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "worldedit", 4 | "version": "${version}", 5 | 6 | "name": "WorldEdit", 7 | "description": "WorldEdit is an easy-to-use in-game world editor for Minecraft, supporting both single- and multi-player.", 8 | "authors": [ 9 | "EngineHub" 10 | ], 11 | "contact": { 12 | "homepage": "https://enginehub.org/worldedit/", 13 | "sources": "https://github.com/EngineHub/WorldEdit" 14 | }, 15 | "custom": { 16 | "modmenu": { 17 | "links": { 18 | "modmenu.discord": "https://discord.gg/enginehub" 19 | } 20 | } 21 | }, 22 | 23 | "license": "GPL3", 24 | "icon": "assets/worldedit/icon.png", 25 | 26 | "environment": "*", 27 | "entrypoints": { 28 | "main": [ 29 | "com.sk89q.worldedit.fabric.FabricWorldEdit" 30 | ] 31 | }, 32 | 33 | "depends": { 34 | "worldeditcui_protocol": "*", 35 | "fabricloader": ">=0.4.0", 36 | "fabric-api-base": "*", 37 | "fabric-command-api-v2": "*", 38 | "fabric-lifecycle-events-v1": "*", 39 | "fabric-events-interaction-v0": "*", 40 | "fabric-networking-api-v1": "*" 41 | }, 42 | "suggests": { 43 | "fabric-permissions-api-v0": "*" 44 | }, 45 | "mixins": [ 46 | "worldedit-fabric.mixins.json" 47 | ], 48 | "accessWidener" : "worldedit.accesswidener" 49 | } 50 | -------------------------------------------------------------------------------- /worldedit-fabric/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "WorldEdit Resources", 4 | "pack_format": 8 5 | } 6 | } -------------------------------------------------------------------------------- /worldedit-fabric/src/main/resources/worldedit-fabric.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "com.sk89q.worldedit.fabric.mixin", 4 | "compatibilityLevel": "JAVA_8", 5 | "mixins": [ 6 | "MixinLevelChunkSetBlockHook", 7 | "MixinMinecraftServer", 8 | "MixinServerGamePacketListenerImpl" 9 | ], 10 | "plugin": "com.sk89q.worldedit.fabric.internal.MixinConfigPlugin", 11 | "server": [ 12 | ], 13 | "injectors": { 14 | "defaultRequire": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /worldedit-fabric/src/main/resources/worldedit.accesswidener: -------------------------------------------------------------------------------- 1 | accessWidener v2 named 2 | 3 | accessible class net/minecraft/server/level/ServerChunkCache$MainThreadExecutor 4 | accessible field net/minecraft/server/level/ServerChunkCache mainThreadProcessor Lnet/minecraft/server/level/ServerChunkCache$MainThreadExecutor; 5 | 6 | accessible field net/minecraft/commands/CommandSourceStack source Lnet/minecraft/commands/CommandSource; 7 | 8 | accessible field net/minecraft/server/level/ServerPlayerGameMode isDestroyingBlock Z 9 | 10 | accessible field net/minecraft/world/level/storage/DerivedLevelData wrapped Lnet/minecraft/world/level/storage/ServerLevelData; 11 | 12 | accessible field net/minecraft/world/level/storage/PrimaryLevelData worldOptions Lnet/minecraft/world/level/levelgen/WorldOptions; 13 | mutable field net/minecraft/world/level/storage/PrimaryLevelData worldOptions Lnet/minecraft/world/level/levelgen/WorldOptions; 14 | 15 | accessible method net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket (Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntityType;Lnet/minecraft/nbt/CompoundTag;)V 16 | -------------------------------------------------------------------------------- /worldedit-libs/README.md: -------------------------------------------------------------------------------- 1 | This project shades _API_ libraries, i.e. those libraries 2 | whose classes are publicly referenced from `-core` classes. 3 | 4 | This project _does not_ shade implementation libraries, i.e. 5 | those libraries whose classes are internally depended on. 6 | 7 | This is because the main reason for shading those libraries is for 8 | their internal usage in each platform, not because we need them available to 9 | dependents of `-core` to compile and work with WorldEdit's API. 10 | -------------------------------------------------------------------------------- /worldedit-libs/build.gradle.kts: -------------------------------------------------------------------------------- 1 | tasks.register("build") { 2 | dependsOn(subprojects.map { it.tasks.named("build") }) 3 | } 4 | -------------------------------------------------------------------------------- /worldedit-libs/bukkit/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | 5 | dependencies { 6 | "shade"(libs.kyoriText.adapter.bukkit) 7 | } 8 | -------------------------------------------------------------------------------- /worldedit-libs/cli/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | -------------------------------------------------------------------------------- /worldedit-libs/core/ap/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | 5 | dependencies { 6 | // These are here because they use net.kyori:text-api -- so they need to be relocated too 7 | "shade"(libs.piston.coreAp.annotations) 8 | "shade"(libs.piston.coreAp.processor) 9 | } 10 | -------------------------------------------------------------------------------- /worldedit-libs/core/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | 5 | dependencies { 6 | "shade"(libs.kyoriText.api) 7 | "shade"(libs.kyoriText.serializer.gson) 8 | "shade"(libs.kyoriText.serializer.legacy) 9 | "shade"(libs.kyoriText.serializer.plain) 10 | // These are here because they use net.kyori:text-api -- so they need to be relocated too 11 | "shade"(libs.piston.core) 12 | "shade"(libs.piston.coreAp.runtime) 13 | "shade"(libs.piston.defaultImpl) 14 | // Linbus 15 | "shade"(platform(libs.linBus.bom)) 16 | "shade"(libs.linBus.common) 17 | "shade"(libs.linBus.stream) 18 | "shade"(libs.linBus.tree) 19 | "shade"(libs.linBus.format.snbt) 20 | } 21 | -------------------------------------------------------------------------------- /worldedit-libs/fabric/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | -------------------------------------------------------------------------------- /worldedit-libs/neoforge/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | -------------------------------------------------------------------------------- /worldedit-libs/sponge/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("buildlogic.libs") 3 | } 4 | -------------------------------------------------------------------------------- /worldedit-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngineHub/WorldEdit/4b5c5316e7e650bee746eeb797510950d216addf/worldedit-logo.png -------------------------------------------------------------------------------- /worldedit-mod/README.md: -------------------------------------------------------------------------------- 1 | This folder is for the merged output of Fabric and Forge jars. This allows us to distribute 2 | both variants of the mod in a single file to avoid end-user confusion. 3 | -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/NeoForgeWatchdog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.neoforge; 21 | 22 | import com.sk89q.worldedit.extension.platform.Watchdog; 23 | import net.minecraft.Util; 24 | import net.minecraft.server.dedicated.DedicatedServer; 25 | 26 | class NeoForgeWatchdog implements Watchdog { 27 | 28 | private final DedicatedServer server; 29 | 30 | NeoForgeWatchdog(DedicatedServer server) { 31 | this.server = server; 32 | } 33 | 34 | @Override 35 | public void tick() { 36 | server.nextTickTimeNanos = Util.getNanos(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/mixin/AccessorServerPlayerGameMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.neoforge.mixin; 21 | 22 | import net.minecraft.server.level.ServerPlayerGameMode; 23 | import org.spongepowered.asm.mixin.Mixin; 24 | import org.spongepowered.asm.mixin.gen.Accessor; 25 | 26 | @Mixin(ServerPlayerGameMode.class) 27 | public interface AccessorServerPlayerGameMode { 28 | 29 | @Accessor("isDestroyingBlock") 30 | boolean isDestroyingBlock(); 31 | } 32 | -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/resources/META-INF/accesstransformer.cfg: -------------------------------------------------------------------------------- 1 | public net.minecraft.server.MinecraftServer nextTickTimeNanos 2 | 3 | # For regen 4 | public net.minecraft.server.MinecraftServer storageSource 5 | public net.minecraft.server.level.ServerChunkCache mainThreadProcessor 6 | 7 | public net.minecraft.world.level.chunk.ChunkBiomeContainer biomes 8 | public-f net.minecraft.world.level.storage.PrimaryLevelData worldOptions 9 | 10 | public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket (Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntityType;Lnet/minecraft/nbt/CompoundTag;)V 11 | -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/resources/META-INF/neoforge.mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "[3,)" 3 | issueTrackerURL = "https://discord.gg/enginehub" 4 | license = "GPLv3" 5 | 6 | [[mods]] 7 | modId = "worldedit" 8 | version = "${version}" 9 | displayName = "WorldEdit" 10 | displayURL = "https://enginehub.org/worldedit/" 11 | description = ''' 12 | WorldEdit is an easy-to-use in-game world editor for Minecraft, supporting both single- and multi-player. 13 | ''' 14 | authors = "EngineHub" 15 | logoFile = "worldedit-icon.png" 16 | displayTest = "IGNORE_SERVER_VERSION" 17 | 18 | [[mixins]] 19 | config = "worldedit-neoforge.mixins.json" 20 | 21 | [[accessTransformers]] 22 | file = "META-INF/accesstransformer.cfg" 23 | 24 | [[dependencies.worldedit]] 25 | modId = "minecraft" 26 | type = "required" 27 | versionRange = "[${minecraftVersion},${nextMajorMinecraftVersion})" 28 | ordering = "NONE" 29 | side = "BOTH" 30 | 31 | [[dependencies.worldedit]] 32 | modId = "neoforge" 33 | type = "required" 34 | versionRange = "[${neoVersion},)" 35 | ordering = "NONE" 36 | side = "BOTH" 37 | -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "WorldEdit Resources", 4 | "pack_format": 8 5 | } 6 | } -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/resources/worldedit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngineHub/WorldEdit/4b5c5316e7e650bee746eeb797510950d216addf/worldedit-neoforge/src/main/resources/worldedit-icon.png -------------------------------------------------------------------------------- /worldedit-neoforge/src/main/resources/worldedit-neoforge.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "com.sk89q.worldedit.neoforge.mixin", 4 | "compatibilityLevel": "JAVA_17", 5 | "mixins": [ 6 | "AccessorServerPlayerGameMode", 7 | "MixinLevelChunkSetBlockHook", 8 | "MixinServerGamePacketListenerImpl" 9 | ], 10 | "server": [ 11 | ], 12 | "injectors": { 13 | "defaultRequire": 1 14 | }, 15 | "refmap": "worldedit-neoforge.mixins.refmap.json" 16 | } 17 | -------------------------------------------------------------------------------- /worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.sponge; 21 | 22 | import org.spongepowered.api.data.persistence.DataQuery; 23 | 24 | /** 25 | * Kinda mirrors Sponge Common's Constants class. 26 | * 27 | *

Internal. Do not use.

28 | */ 29 | public class Constants { 30 | public static class Sponge { 31 | public static final DataQuery UNSAFE_NBT = DataQuery.of("UnsafeData"); 32 | 33 | private Sponge() { 34 | } 35 | } 36 | 37 | private Constants() { 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/internal/LocaleResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WorldEdit, a Minecraft world manipulation toolkit 3 | * Copyright (C) sk89q 4 | * Copyright (C) WorldEdit team and contributors 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | package com.sk89q.worldedit.sponge.internal; 21 | 22 | import com.sk89q.worldedit.WorldEdit; 23 | import net.kyori.adventure.audience.Audience; 24 | import org.spongepowered.api.util.locale.LocaleSource; 25 | 26 | import java.util.Locale; 27 | 28 | public class LocaleResolver { 29 | public static Locale resolveLocale(Audience audience) { 30 | if (audience instanceof LocaleSource) { 31 | return ((LocaleSource) audience).locale(); 32 | } 33 | return WorldEdit.getInstance().getConfiguration().defaultLocale; 34 | } 35 | } 36 | --------------------------------------------------------------------------------