From 610e204d12b2230788ca4846b84b36412adb7ca6 Mon Sep 17 00:00:00 2001 From: MattBDev Date: Fri, 29 Jul 2016 12:31:45 -0400 Subject: [PATCH] Fix #1281 , Fix #1282 , and Sponge gradle --- .../com/plotsquared/bukkit/listeners/PlayerEvents.java | 3 +++ .../main/java/com/plotsquared/listener/PlotListener.java | 3 ++- Sponge/build.gradle | 4 ++-- .../src/main/java/com/plotsquared/sponge/SpongeMain.java | 8 ++++++++ build.gradle | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 66eb98c18..b28e1eb6b 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1850,6 +1850,9 @@ public class PlayerEvents extends PlotListener implements Listener { @EventHandler(priority = EventPriority.MONITOR) public void onLeave(PlayerQuitEvent event) { + if (TaskManager.TELEPORT_QUEUE.contains(event.getPlayer().getName())) { + TaskManager.TELEPORT_QUEUE.remove(event.getPlayer().getName()); + } PlotPlayer pp = BukkitUtil.getPlayer(event.getPlayer()); pp.unregister(); } diff --git a/Core/src/main/java/com/plotsquared/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/listener/PlotListener.java index 17f3eee63..8b9fc1ced 100644 --- a/Core/src/main/java/com/plotsquared/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/listener/PlotListener.java @@ -207,7 +207,8 @@ public class PlotListener { for (UUID uuid : plot.getOwners()) { PlotPlayer owner = UUIDHandler.getPlayer(uuid); if ((owner != null) && !owner.getUUID().equals(player.getUUID())) { - MainUtil.sendMessage(player, C.NOTIFY_LEAVE.s().replace("%player", player.getName()).replace("%plot", plot.getId().toString())); + MainUtil.sendMessage(owner, C.NOTIFY_LEAVE.s().replace("%player", player.getName()).replace("%plot", plot.getId() + .toString())); } } } diff --git a/Sponge/build.gradle b/Sponge/build.gradle index 747a615cb..5300dd804 100644 --- a/Sponge/build.gradle +++ b/Sponge/build.gradle @@ -14,7 +14,7 @@ buildscript { } } -apply plugin: 'net.minecraftforge.gradle.forge' +apply plugin: 'net.minecrell.vanilla.server.library' dependencies { compile project(':Core') @@ -41,7 +41,7 @@ repositories { } } minecraft { - version = "2014" + version = "1.10.2" mappings = "snapshot_20160629" runDir = 'run' } diff --git a/Sponge/src/main/java/com/plotsquared/sponge/SpongeMain.java b/Sponge/src/main/java/com/plotsquared/sponge/SpongeMain.java index 6056574db..c3c935995 100644 --- a/Sponge/src/main/java/com/plotsquared/sponge/SpongeMain.java +++ b/Sponge/src/main/java/com/plotsquared/sponge/SpongeMain.java @@ -68,6 +68,14 @@ import org.spongepowered.api.world.gen.GenerationPopulator; import org.spongepowered.api.world.gen.WorldGenerator; import org.spongepowered.api.world.gen.WorldGeneratorModifier; +import java.io.File; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.UUID; +import java.util.stream.Collectors; + @Plugin(id = "plotsquared", name = "PlotSquared", description = "Easy, yet powerful Plot World generation and management.", url = "https://github.com/IntellectualSites/PlotSquared", version = "3.5.0-SNAPSHOT") public class SpongeMain implements IPlotMain { diff --git a/build.gradle b/build.gradle index 559c46745..58eafd20c 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ ext { git = Grgit.open() revision = "${git.head().abbreviatedId}" } -version = "3.4.5-SNAPSHOT${revision}" +version = "3.4.5-SNAPSHOT-${revision}" description = """PlotSquared""" subprojects {