mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Fixed help menu/plot delete -> plot exit not being called
This commit is contained in:
parent
bddaadd31d
commit
cb10f39753
@ -29,6 +29,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.listeners.PlotListener;
|
||||
|
||||
/**
|
||||
* plot functions
|
||||
@ -655,7 +656,9 @@ public class PlotHelper {
|
||||
final PlotId id = PlayerFunctions.getPlot(entity.getLocation());
|
||||
if ((id != null) && id.equals(plot.id)) {
|
||||
if (entity instanceof Player) {
|
||||
PlotMain.teleportPlayer((Player) entity, entity.getLocation(), plot);
|
||||
Player player = (Player) entity;
|
||||
PlotMain.teleportPlayer(player, entity.getLocation(), plot);
|
||||
PlotListener.plotExit(player, plot);
|
||||
}
|
||||
else {
|
||||
entity.remove();
|
||||
|
@ -196,7 +196,7 @@ public class MainCommand implements CommandExecutor, TabCompleter {
|
||||
|
||||
final int start = page * perPage;
|
||||
for (int x = start; x < max; x++) {
|
||||
cmd = subCommands.get(x);
|
||||
cmd = commands.get(x);
|
||||
String s = t(C.HELP_PAGE.s());
|
||||
s = s.replaceAll("%alias%", cmd.alias);
|
||||
s = s.replaceAll("%usage%", cmd.usage.contains("plot") ? cmd.usage : "/plot " + cmd.usage);
|
||||
|
Loading…
Reference in New Issue
Block a user