diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-10-16 20:59:39 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-10-16 21:05:33 +0100 |
commit | ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104 (patch) | |
tree | d4438b241ea1b251105a2622aada79542c2f41ce /EssentialsSpawn/src | |
parent | d6dfe5da65fdc9bda682615488f5dc9917c394b5 (diff) | |
download | Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar.gz Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar.lz Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.tar.xz Essentials-ff46b39f2b42abbe4ce8dc39e564f3dc71a2a104.zip |
Extract CommandSender to CommandSource, this should prevent Ess user object leaks.
Diffstat (limited to 'EssentialsSpawn/src')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java | 4 | ||||
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java index 35edd172c..2317e774c 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java @@ -1,5 +1,6 @@ package com.earth2me.essentials.spawn; +import com.earth2me.essentials.CommandSource; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.Console; import com.earth2me.essentials.Trade; @@ -9,7 +10,6 @@ import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.commands.NotEnoughArgumentsException; import org.bukkit.Location; import org.bukkit.Server; -import org.bukkit.command.CommandSender; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -43,7 +43,7 @@ public class Commandspawn extends EssentialsCommand } @Override - protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception + protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception { if (args.length < 1) { diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index 6fcabe6e0..668294970 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -108,7 +108,7 @@ public class EssentialsSpawnPlayerListener implements Listener //This method allows for multiple line player announce messages using multiline yaml syntax #EasterEgg if (ess.getSettings().getAnnounceNewPlayers()) { - final IText output = new KeywordReplacer(ess.getSettings().getAnnounceNewPlayerFormat(), user.getBase(), ess); + final IText output = new KeywordReplacer(ess.getSettings().getAnnounceNewPlayerFormat(), user.getSource(), ess); final SimpleTextPager pager = new SimpleTextPager(output); for (String line : pager.getLines()) |