mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 18:14:38 +02:00
Extract CommandSender to CommandSource, this should prevent Ess user object leaks.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user