Skip to content
Permalink
Browse files

Merge master branch

  • Loading branch information...
kenzierocks committed Aug 12, 2019
2 parents b2e1d18 + ec5bc5a commit 5b38e59786b51947b9ef6798c38403453a63ce43
Showing with 1,033 additions and 595 deletions.
  1. +1 −0 .travis.yml
  2. +41 −0 CHANGELOG.txt
  3. +2 −2 README.md
  4. +1 −1 buildSrc/src/main/kotlin/Versions.kt
  5. +2 −3 contrib/craftscripts/README.txt
  6. +1 −1 gradle.properties
  7. +0 −4 worldedit-bukkit/src/main/java/com/sk89q/wepif/PermissionsResolverManager.java
  8. +6 −7 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java
  9. +4 −3 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
  10. +23 −20 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java
  11. +1 −1 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplLoader.java
  12. +0 −3 worldedit-bukkit/src/main/resources/plugin.yml
  13. BIN worldedit-bukkit/src/main/resources/worldedit-adapters.jar
  14. +75 −24 worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java
  15. +3 −2 worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java
  16. +2 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/BiomeCommands.java
  17. +7 −4 worldedit-core/src/main/java/com/sk89q/worldedit/command/BrushCommands.java
  18. +32 −7 worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java
  19. +2 −0 worldedit-core/src/main/java/com/sk89q/worldedit/command/ClipboardCommands.java
  20. +3 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java
  21. +41 −4 worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java
  22. +45 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java
  23. +64 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/SelectionCommands.java
  24. +5 −5 worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java
  25. +2 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java
  26. +2 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java
  27. +38 −4 worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java
  28. +2 −3 worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/BlockReplacer.java
  29. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/CylinderBrush.java
  30. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowCylinderBrush.java
  31. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/HollowSphereBrush.java
  32. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/brush/SphereBrush.java
  33. +10 −9 worldedit-core/src/main/java/com/sk89q/worldedit/command/util/PrintCommandHelp.java
  34. +4 −3 worldedit-core/src/main/java/com/sk89q/worldedit/command/util/SuggestionHelper.java
  35. +11 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/MaskFactory.java
  36. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BiomeMaskParser.java
  37. +1 −2 ...core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlockCategoryMaskParser.java
  38. +1 −2 ...it-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlockStateMaskParser.java
  39. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlocksMaskParser.java
  40. +1 −2 ...edit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/ExistingMaskParser.java
  41. +1 −2 ...it-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/ExpressionMaskParser.java
  42. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/OffsetMaskParser.java
  43. +1 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/SolidMaskParser.java
  44. +2 −3 ...rc/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/BlockCategoryPatternParser.java
  45. +1 −2 .../src/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/RandomStatePatternParser.java
  46. +1 −2 .../src/main/java/com/sk89q/worldedit/extension/factory/parser/pattern/SingleBlockPatternParser.java
  47. +95 −47 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/AbstractPlayerActor.java
  48. +21 −1 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Capability.java
  49. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java
  50. +5 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlayerProxy.java
  51. +53 −4 worldedit-core/src/main/java/com/sk89q/worldedit/extent/buffer/ForgetfulExtentBuffer.java
  52. +18 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/MCEditSchematicReader.java
  53. +4 −3 worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java
  54. +3 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicWriter.java
  55. +10 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extent/world/ChunkLoadingExtent.java
  56. +15 −4 worldedit-core/src/main/java/com/sk89q/worldedit/function/biome/BiomeReplace.java
  57. +6 −7 worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/FloraGenerator.java
  58. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/ForestGenerator.java
  59. +2 −3 worldedit-core/src/main/java/com/sk89q/worldedit/function/generator/GardenPatchGenerator.java
  60. +37 −0 worldedit-core/src/main/java/com/sk89q/worldedit/function/pattern/BiomePattern.java
  61. +3 −0 worldedit-core/src/main/java/com/sk89q/worldedit/function/pattern/BlockPattern.java
  62. +37 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/annotation/ClipboardMask.java
  63. +23 −36 worldedit-core/src/main/java/com/sk89q/worldedit/internal/block/BlockStateIdAccess.java
  64. +23 −7 worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandArgParser.java
  65. +20 −3 worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandUtil.java
  66. +6 −4 worldedit-core/src/main/java/com/sk89q/worldedit/internal/cui/ServerCUIHandler.java
  67. +6 −2 worldedit-core/src/main/java/com/sk89q/worldedit/internal/util/Substring.java
  68. +40 −0 worldedit-core/src/main/java/com/sk89q/worldedit/regions/AbstractFlatRegion.java
  69. +5 −4 worldedit-core/src/main/java/com/sk89q/worldedit/session/SessionManager.java
  70. +23 −3 worldedit-core/src/main/java/com/sk89q/worldedit/util/concurrency/EvenMoreExecutors.java
  71. +0 −90 ...dit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/BlockDistributionResult.java
  72. +5 −3 worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/CommandListBox.java
  73. +10 −6 worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/CommandUsageBox.java
  74. +0 −75 ...edit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/SchematicPaginationBox.java
  75. +8 −1 worldedit-core/src/main/java/com/sk89q/worldedit/world/biome/BiomeType.java
  76. +3 −21 worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java
  77. +8 −1 worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockStateHolder.java
  78. +15 −8 worldedit-core/src/test/java/com/sk89q/worldedit/internal/command/CommandArgParserTest.java
  79. +3 −3 worldedit-fabric/build.gradle.kts
  80. +2 −1 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/CommandWrapper.java
  81. +14 −1 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricPlayer.java
  82. +18 −5 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricWorld.java
  83. +0 −79 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/TileEntityUtils.java
  84. +4 −5 worldedit-forge/build.gradle.kts
  85. +2 −1 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/CommandWrapper.java
  86. +1 −1 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlatform.java
  87. +14 −1 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlayer.java
  88. +6 −5 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java
  89. +2 −2 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java
  90. +2 −2 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ThreadSafeCache.java
  91. +1 −1 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/WorldEditFakePlayer.java
  92. +1 −1 worldedit-forge/src/main/resources/META-INF/mods.toml
  93. +11 −0 worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlayer.java
@@ -1,3 +1,4 @@
dist: trusty
language: java
notifications:
email: false
@@ -1,3 +1,44 @@
7.0.1
- Fix source masks using EdiSession instead of clipboard
- Fix bug with spaces in suggestions
- Fix schematic list box loading schematics with spaces in path
- Improve //thru (and navwand) in some cases
- Fix error when /up was used below the world
- Fix /up -f using glass anyway.
- Fix suggestions for quoted strings
- Improve suggestions for mask intersections
- Fix setting biomes in unloaded chunks
- BlockStateHolder now extends Pattern (API enhancement)
- Skip invalid blocks when schematic versions are mismatched
- Add -e/-b/-m flags to stack and move, just as copy/paste have
- Fix //center for selections with even-sized height
- (Fabric) Fix setting tile entities
- (Forge) Update to latest Forge builds (28.0.45+ required!)
- (Fabric/Forge Single-player) Fix wrong blocks being used when switching
between worlds generated at different times/with different mods
- Improve //naturalize over large areas
- Fixed //restore with 1.14 worlds
- Added item brush support to WorldEdit for Bukkit (Formerly just Forge)
- Create an internal state ID mapping for performance
- Improve rotation for some blocks
- Added .self permission node to undo/redo to only allow undoing and redoing own history
- Improve sponge schematic implementation
- Re-add the delchunks command
- Added 1.14 blocks, items, tags, etc to the API (Remains compatible with 1.13)
- Made the navigation and selection wands normal tools that can be rebound per-user with //selwand and //navwand
- Added //wand -n to get the navigation wand
- Improved movement of paintings
- Allow command suggestions for selectors
- Allow block replacer to work with tile entities
- Fixed pasting leashed entities
- Fixed setting player heads with names
- Added a mask flag to //count
- Setup pagination for //distr
- Fixed an entity-related error being caused by plugins improperly using Spigot
- Fixed gravity brush
- Modify chunk batching for performance
- Further legacy schematic loading improvements

7.0.0
See https://matthewmiller.dev/blog/introducing-worldedit-7/ for a friendlier explanation of some new features

@@ -31,5 +31,5 @@ Links
* [Discord](https://discord.gg/enginehub)
* [IRC channel](https://webchat.esper.net/?join=sk89q) (#sk89q on irc.esper.net)
* [Issue tracker](https://dev.enginehub.org/youtrack/issues/WORLDEDIT)
* [Continuous integration](http://builds.enginehub.org) [![Build Status](https://travis-ci.org/EngineHub/WorldEdit.svg?branch=master)](https://travis-ci.org/EngineHub/WorldEdit)
* [End-user documentation](https://worldedit.readthedocs.io/en/latest/) / [Older Wiki](http://wiki.sk89q.com/wiki/WorldEdit)
* [Continuous integration](http://builds.enginehub.org) [![Build Status](https://ci.enginehub.org/app/rest/builds/buildType:bt10,branch:master/statusIcon.svg)](http://ci.enginehub.org/viewType.html?buildTypeId=bt10&guest=1)
* [End-user documentation](https://worldedit.enginehub.org/en/latest/)
@@ -1,7 +1,7 @@
object Versions {
const val TEXT = "3.0.1"
const val TEXT_EXTRAS = "3.0.2"
const val PISTON = "0.4.2"
const val PISTON = "0.4.3"
const val AUTO_VALUE = "1.6.5"
const val JUNIT = "5.5.0"
const val MOCKITO = "3.0.0"
@@ -6,10 +6,9 @@ Example usage:

You may or may not install these scripts -- it is optional. If you are, however,
place the entire craftscripts/ folder into the respective directory for the platform
that you have installed WorldEdit for
(see http://wiki.sk89q.com/wiki/WorldEdit/Installation).
that you have installed WorldEdit.

In order to be able to use CraftScripts, you must install the Rhino JavaScript library.
The installation page linked above has information about that. More information
about scripts in general can be found at
http://wiki.sk89q.com/wiki/WorldEdit/Scripting
https://worldedit.enginehub.org/en/latest/usage/other/craftscripts/
@@ -1,4 +1,4 @@
group=com.sk89q.worldedit
version=7.0.1-SNAPSHOT
version=7.1.0-SNAPSHOT

org.gradle.jvmargs=-Xmx1G
@@ -57,10 +57,6 @@
"# into WEPIF, paste it into http://yaml-online-parser.appspot.com/\r\n" +
"# and see if it gives \"ERROR:\".\r\n" +
"# - Lines starting with # are comments and so they are ignored.\r\n" +
"#\r\n" +
"# About Configuration Permissions\r\n" +
"# - See http://wiki.sk89q.com/wiki/WorldEdit/Permissions/Bukkit\r\n" +
"# - Now with multiworld support (see example)\r\n" +
"\r\n";

private static PermissionsResolverManager instance;
@@ -185,14 +185,13 @@ public Player getPlayer() {
}

@Override
public void floatAt(int x, int y, int z, boolean alwaysGlass) {
if (alwaysGlass || !player.getAllowFlight()) {
super.floatAt(x, y, z, alwaysGlass);
return;
}
public boolean isAllowedToFly() {
return player.getAllowFlight();
}

setPosition(Vector3.at(x + 0.5, y, z + 0.5));
player.setFlying(true);
@Override
public void setFlying(boolean flying) {
player.setFlying(flying);
}

@Override
@@ -316,15 +316,16 @@ public void checkLoadedChunk(BlockVector3 pt) {

@Override
public boolean equals(Object other) {
if (worldRef.get() == null) {
final World ref = worldRef.get();
if (ref == null) {
return false;
} else if (other == null) {
return false;
} else if ((other instanceof BukkitWorld)) {
World otherWorld = ((BukkitWorld) other).worldRef.get();
return otherWorld != null && otherWorld.equals(getWorld());
return ref.equals(otherWorld);
} else if (other instanceof com.sk89q.worldedit.world.World) {
return ((com.sk89q.worldedit.world.World) other).getName().equals(getName());
return ((com.sk89q.worldedit.world.World) other).getName().equals(ref.getName());
} else {
return false;
}
@@ -96,7 +96,6 @@
private static final Logger log = LoggerFactory.getLogger(WorldEditPlugin.class);
public static final String CUI_PLUGIN_CHANNEL = "worldedit:cui";
private static WorldEditPlugin INSTANCE;
private static WorldInitListener worldInitListener = null;

private BukkitImplAdapter bukkitAdapter;
private BukkitServerInterface server;
@@ -139,35 +138,39 @@ public void onEnable() {
getServer().getPluginManager().registerEvents(new AsyncTabCompleteListener(), this);
}

// register this so we can load world-dependent data right as the first world is loading
if (worldInitListener != null) {
initializeRegistries(); // this creates the objects matching Bukkit's enums - but doesn't fill them with data yet
if (Bukkit.getWorlds().isEmpty()) {
setupPreWorldData();
// register this so we can load world-dependent data right as the first world is loading
getServer().getPluginManager().registerEvents(new WorldInitListener(), this);
} else {
getLogger().warning("Server reload detected. This may cause various issues with WorldEdit and dependent plugins.");
try {
// these don't stick around between reload
loadAdapter();
loadConfig();
WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent());
setupPreWorldData();
// since worlds are loaded already, we can do this now
setupWorldData();
} catch (Throwable ignored) {
}
} else {
getServer().getPluginManager().registerEvents((worldInitListener = new WorldInitListener()), this);
loadAdapter(); // Need an adapter to work with special blocks with NBT data
setupRegistries();
WorldEdit.getInstance().loadMappings();
loadConfig(); // Load configuration
}

// Enable metrics
new Metrics(this);
PaperLib.suggestPaper(this);
}

private void setupPreWorldData() {
loadAdapter();
loadConfig();
WorldEdit.getInstance().loadMappings();
}

private void setupWorldData() {
setupTags();
setupTags(); // datapacks aren't loaded until just before the world is, and bukkit has no event for this
// so the earliest we can do this is in WorldInit
WorldEdit.getInstance().getEventBus().post(new PlatformReadyEvent());
}

private void setupRegistries() {
private void initializeRegistries() {
// Biome
for (Biome biome : Biome.values()) {
String lowerCaseBiomeName = biome.name().toLowerCase(Locale.ROOT);
@@ -332,7 +335,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
// code of WorldEdit expects it
String[] split = new String[args.length + 1];
System.arraycopy(args, 0, split, 1, args.length);
split[0] = "/" + cmd.getName();
split[0] = "/" + commandLabel;

CommandEvent event = new CommandEvent(wrapCommandSender(sender), Joiner.on(" ").join(split));
getWorldEdit().getEventBus().post(event);
@@ -346,7 +349,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
// code of WorldEdit expects it
String[] split = new String[args.length + 1];
System.arraycopy(args, 0, split, 1, args.length);
split[0] = "/" + cmd.getName();
split[0] = "/" + commandLabel;

String arguments = Joiner.on(" ").join(split);
CommandSuggestionEvent event = new CommandSuggestionEvent(wrapCommandSender(sender), arguments);
@@ -487,9 +490,9 @@ public void onAsyncTabComplete(com.destroystokyo.paper.event.server.AsyncTabComp
if (!event.isCommand()) return;

String buffer = event.getBuffer();
final String[] parts = buffer.split(" ");
if (parts.length < 1) return;
final String label = parts[0];
int firstSpace = buffer.indexOf(' ');
if (firstSpace < 0) return;
final String label = buffer.substring(0, firstSpace);
final Optional<org.enginehub.piston.Command> command
= WorldEdit.getInstance().getPlatformManager().getPlatformCommandManager().getCommandManager().getCommand(label);
if (!command.isPresent()) return;
@@ -54,7 +54,7 @@
"** will be blank, and so on. There will be no support for entity\n" +
"** and block property-related functions.\n" +
"**\n" +
"** Please see https://worldedit.rtfd.io/en/latest/faq/#bukkit-adapters\n" +
"** Please see https://worldedit.enginehub.org/en/latest/faq/#bukkit-adapters\n" +
"**********************************************\n";

/**
@@ -3,6 +3,3 @@ main: com.sk89q.worldedit.bukkit.WorldEditPlugin
version: "${internalVersion}"
load: STARTUP
api-version: 1.13

# Permissions aren't here. Read http://wiki.sk89q.com/wiki/WEPIF/DinnerPerms
# for how WorldEdit permissions actually work.
Binary file not shown.

0 comments on commit 5b38e59

Please sign in to comment.
You can’t perform that action at this time.