From 213cadf093273ef1477df43597283c837c7d1fad Mon Sep 17 00:00:00 2001 From: wizjany Date: Thu, 13 Jun 2019 09:17:00 -0400 Subject: [PATCH] Import cleanup, ensure gradle uses https for deps, bump deps. --- worldedit-bukkit/build.gradle | 4 ++-- .../com/sk89q/worldedit/bukkit/BukkitCommandInspector.java | 3 --- .../java/com/sk89q/worldedit/bukkit/WorldEditListener.java | 5 +---- .../java/com/sk89q/worldedit/command/ChunkCommands.java | 1 - .../java/com/sk89q/worldedit/command/GeneralCommands.java | 1 - .../worldedit/command/argument/DirectionConverter.java | 1 - .../worldedit/extent/clipboard/io/NBTSchematicReader.java | 1 - .../io/legacycompat/EntityNBTCompatibilityHandler.java | 4 ---- .../io/legacycompat/Pre13HangingCompatibilityHandler.java | 1 - .../com/sk89q/worldedit/function/mask/ExpressionMask.java | 1 - .../com/sk89q/worldedit/function/mask/ExpressionMask2D.java | 1 - .../extent/transform/BlockTransformExtentTest.java | 1 - .../src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java | 3 --- .../main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java | 5 ----- worldedit-sponge/build.gradle | 6 +++--- .../sk89q/worldedit/sponge/adapter/SpongeImplAdapter.java | 1 - 16 files changed, 6 insertions(+), 33 deletions(-) diff --git a/worldedit-bukkit/build.gradle b/worldedit-bukkit/build.gradle index 28dc522c6..ba7a34f31 100644 --- a/worldedit-bukkit/build.gradle +++ b/worldedit-bukkit/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation 'io.papermc:paperlib:1.0.2' compileOnly 'com.sk89q:dummypermscompat:1.10' implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.1' - implementation 'org.bstats:bstats-bukkit:1.4' + implementation 'org.bstats:bstats-bukkit:1.5' testCompile 'org.mockito:mockito-core:1.9.0-rc1' } @@ -52,7 +52,7 @@ shadowJar { include(dependency('org.slf4j:slf4j-api')) include(dependency("org.apache.logging.log4j:log4j-slf4j-impl")) relocate ("org.bstats", "com.sk89q.worldedit.bukkit.bstats") { - include(dependency("org.bstats:bstats-bukkit:1.4")) + include(dependency("org.bstats:bstats-bukkit:1.5")) } relocate ("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") { include(dependency("io.papermc:paperlib:1.0.2")) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java index 005d79259..972f7f5e1 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandInspector.java @@ -24,12 +24,9 @@ import com.sk89q.worldedit.extension.platform.Actor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.enginehub.piston.CommandManager; -import org.enginehub.piston.CommandParameters; -import org.enginehub.piston.NoInputCommandParameters; import org.enginehub.piston.inject.InjectedValueStore; import org.enginehub.piston.inject.Key; import org.enginehub.piston.inject.MapBackedValueStore; -import org.enginehub.piston.inject.MemoizingValueAccess; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java index 8f19dc3a0..f32ca1ac5 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditListener.java @@ -37,12 +37,9 @@ import org.bukkit.event.player.PlayerGameModeChangeEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.EquipmentSlot; import org.enginehub.piston.CommandManager; -import org.enginehub.piston.CommandParameters; -import org.enginehub.piston.NoInputCommandParameters; import org.enginehub.piston.inject.InjectedValueStore; import org.enginehub.piston.inject.Key; import org.enginehub.piston.inject.MapBackedValueStore; -import org.enginehub.piston.inject.MemoizingValueAccess; import java.util.Optional; @@ -73,7 +70,7 @@ public class WorldEditListener implements Listener { } @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) - public void onPlayerCommand(PlayerCommandSendEvent event) { + public void onPlayerCommandSend(PlayerCommandSendEvent event) { InjectedValueStore store = MapBackedValueStore.create(); store.injectValue(Key.of(Actor.class), context -> Optional.of(plugin.wrapCommandSender(event.getPlayer()))); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java index 3c097b992..af1e4e95d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ChunkCommands.java @@ -38,7 +38,6 @@ import com.sk89q.worldedit.world.storage.LegacyChunkStore; import com.sk89q.worldedit.world.storage.McRegionChunkStore; import org.enginehub.piston.annotation.Command; import org.enginehub.piston.annotation.CommandContainer; -import org.enginehub.piston.annotation.param.Arg; import org.enginehub.piston.annotation.param.ArgFlag; import java.io.FileOutputStream; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java index 92ab5611d..38d92a34e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java @@ -24,7 +24,6 @@ import com.sk89q.worldedit.LocalConfiguration; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.command.util.AsyncCommandBuilder; import com.sk89q.worldedit.command.util.CommandPermissions; import com.sk89q.worldedit.command.util.CommandPermissionsConditionGenerator; import com.sk89q.worldedit.command.util.WorldEditAsyncCommandBuilder; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/DirectionConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/DirectionConverter.java index 22e0b2fbe..d83bc51c6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/DirectionConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/DirectionConverter.java @@ -22,7 +22,6 @@ package com.sk89q.worldedit.command.argument; import com.sk89q.worldedit.UnknownDirectionException; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; -import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.util.Direction; import org.enginehub.piston.CommandManager; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java index 12f1f1b41..cc8f9ee81 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/NBTSchematicReader.java @@ -19,7 +19,6 @@ package com.sk89q.worldedit.extent.clipboard.io; -import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.Tag; import java.io.IOException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/EntityNBTCompatibilityHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/EntityNBTCompatibilityHandler.java index ffba0b566..389a596cb 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/EntityNBTCompatibilityHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/EntityNBTCompatibilityHandler.java @@ -20,12 +20,8 @@ package com.sk89q.worldedit.extent.clipboard.io.legacycompat; import com.sk89q.jnbt.CompoundTag; -import com.sk89q.jnbt.Tag; -import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.entity.EntityType; -import java.util.Map; - public interface EntityNBTCompatibilityHandler { boolean isAffectedEntity(EntityType type, CompoundTag entityTag); CompoundTag updateNBT(EntityType type, CompoundTag entityTag); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/Pre13HangingCompatibilityHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/Pre13HangingCompatibilityHandler.java index 62f40d79c..c42fab428 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/Pre13HangingCompatibilityHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/legacycompat/Pre13HangingCompatibilityHandler.java @@ -19,7 +19,6 @@ package com.sk89q.worldedit.extent.clipboard.io.legacycompat; -import com.sk89q.jnbt.ByteTag; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTagBuilder; import com.sk89q.worldedit.internal.helper.MCDirections; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java index d8ddcc704..eba02d0a7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask.java @@ -21,7 +21,6 @@ package com.sk89q.worldedit.function.mask; import static com.google.common.base.Preconditions.checkNotNull; -import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.internal.expression.Expression; import com.sk89q.worldedit.internal.expression.ExpressionException; import com.sk89q.worldedit.internal.expression.runtime.EvaluationException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java index 0f4d9b198..a50c5e375 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/ExpressionMask2D.java @@ -21,7 +21,6 @@ package com.sk89q.worldedit.function.mask; import static com.google.common.base.Preconditions.checkNotNull; -import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.internal.expression.Expression; import com.sk89q.worldedit.internal.expression.ExpressionException; import com.sk89q.worldedit.internal.expression.runtime.EvaluationException; diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/extent/transform/BlockTransformExtentTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/extent/transform/BlockTransformExtentTest.java index c90f312fe..633e359f8 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/extent/transform/BlockTransformExtentTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/extent/transform/BlockTransformExtentTest.java @@ -25,7 +25,6 @@ import com.sk89q.worldedit.math.transform.AffineTransform; import com.sk89q.worldedit.math.transform.Transform; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; -import com.sk89q.worldedit.world.block.BlockTypes; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java index 4b6c8d6a5..14061d6e6 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java @@ -53,7 +53,6 @@ import net.minecraft.entity.EntityType; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUseContext; import net.minecraft.nbt.NBTTagCompound; @@ -64,7 +63,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraft.world.chunk.Chunk; @@ -88,7 +86,6 @@ import net.minecraft.world.gen.feature.SwampTreeFeature; import net.minecraft.world.gen.feature.TallTaigaTreeFeature; import net.minecraft.world.gen.feature.TreeFeature; import net.minecraft.world.storage.WorldInfo; -import net.minecraftforge.common.DimensionManager; import java.io.File; import java.lang.ref.WeakReference; diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java index 897cebe16..e5628b03b 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java @@ -41,7 +41,6 @@ import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.entity.EntityType; import com.sk89q.worldedit.world.item.ItemCategory; import com.sk89q.worldedit.world.item.ItemType; -import net.minecraft.client.Minecraft; import net.minecraft.command.CommandSource; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.tags.BlockTags; @@ -49,7 +48,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.util.EnumHand; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.CommandEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; @@ -62,12 +60,9 @@ import net.minecraftforge.fml.ModContainer; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; -import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerStartedEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.fml.loading.FMLLoader; import net.minecraftforge.fml.loading.FMLPaths; import net.minecraftforge.registries.ForgeRegistries; import org.apache.logging.log4j.LogManager; diff --git a/worldedit-sponge/build.gradle b/worldedit-sponge/build.gradle index 6d75c4d84..a745869b6 100644 --- a/worldedit-sponge/build.gradle +++ b/worldedit-sponge/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { mavenCentral() - maven { url = "http://files.minecraftforge.net/maven" } + maven { url = "https://files.minecraftforge.net/maven" } maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } jcenter() } @@ -19,7 +19,7 @@ dependencies { compile project(':worldedit-core') compile project(':worldedit-libs:sponge') compile 'org.spongepowered:spongeapi:7.1.0' - compile 'org.bstats:bstats-sponge:1.4' + compile 'org.bstats:bstats-sponge:1.5' testCompile group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1' } @@ -42,7 +42,7 @@ jar { shadowJar { dependencies { relocate ("org.bstats", "com.sk89q.worldedit.sponge.bstats") { - include(dependency('org.bstats:bstats-sponge:1.4')) + include(dependency('org.bstats:bstats-sponge:1.5')) } } } diff --git a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/adapter/SpongeImplAdapter.java b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/adapter/SpongeImplAdapter.java index d2ddf99e5..c6d5f11b6 100644 --- a/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/adapter/SpongeImplAdapter.java +++ b/worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/adapter/SpongeImplAdapter.java @@ -29,7 +29,6 @@ import com.sk89q.worldedit.util.Location; import org.spongepowered.api.entity.Entity; import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.world.World; -import org.spongepowered.api.world.biome.BiomeType; /** * An interface for various things that can't be done through the Sponge API.