mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 16:46:45 +01:00
commit
dbdd207390
@ -610,10 +610,17 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
return;
|
||||
}
|
||||
final PlotWorld plotworld = PS.get().getPlotWorld(world);
|
||||
final PlotPlayer plr = BukkitUtil.getPlayer(player);
|
||||
if (!plotworld.PLOT_CHAT && (plr.getMeta("chat") == null || !(Boolean) plr.getMeta("chat"))) {
|
||||
|
||||
if (!plotworld.PLOT_CHAT) {
|
||||
return;
|
||||
}
|
||||
|
||||
final PlotPlayer plr = BukkitUtil.getPlayer(player);
|
||||
|
||||
if (!plr.getAttribute("chat")) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Location loc = BukkitUtil.getLocation(player);
|
||||
final Plot plot = MainUtil.getPlot(loc);
|
||||
if (plot == null) {
|
||||
@ -631,9 +638,10 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
recipients.add(p);
|
||||
}
|
||||
}
|
||||
format = format.replaceAll("%plot_id%", id.x + ";" + id.y).replaceAll("%sender%", sender).replaceAll("%msg%", message);
|
||||
format = format.replaceAll("%plot_id%", id.x + ";" + id.y).replaceAll("%sender%", "%s").replaceAll("%msg%", "%s");
|
||||
format = ChatColor.translateAlternateColorCodes('&', format);
|
||||
event.setFormat(format);
|
||||
event.setMessage(message);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
|
@ -4,9 +4,14 @@ import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.spongepowered.api.data.key.Keys;
|
||||
import org.spongepowered.api.data.manipulator.mutable.TargetedLocationData;
|
||||
import org.spongepowered.api.data.value.mutable.Value;
|
||||
import org.spongepowered.api.entity.player.Player;
|
||||
import org.spongepowered.api.entity.player.gamemode.GameMode;
|
||||
import org.spongepowered.api.entity.player.gamemode.GameModes;
|
||||
import org.spongepowered.api.text.Texts;
|
||||
import org.spongepowered.api.text.chat.ChatType;
|
||||
import org.spongepowered.api.text.chat.ChatTypes;
|
||||
|
||||
import com.flowpowered.math.vector.Vector3d;
|
||||
@ -100,7 +105,7 @@ public class SpongePlayer extends PlotPlayer {
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
player.sendMessage(ChatTypes.CHAT, message);
|
||||
player.sendMessage(ChatTypes.CHAT, Texts.of(message));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user