mirror of https://github.com/LOOHP/Limbo.git
Changed chat conditions
This commit is contained in:
parent
268b8dc234
commit
6ce1a73411
|
|
@ -247,13 +247,15 @@ public class Player extends LivingEntity implements CommandSender {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void chat(String message) {
|
public void chat(String message) {
|
||||||
String format = "<%name%> %message%";
|
if (Limbo.getInstance().getServerProperties().isAllowChat()) {
|
||||||
PlayerChatEvent event = (PlayerChatEvent) Limbo.getInstance().getEventsManager().callEvent(new PlayerChatEvent(this, format, message, false));
|
String format = "<%name%> %message%";
|
||||||
if (!event.isCancelled() && (Limbo.getInstance().getServerProperties().isAllowChat() || this.hasPermission("limboserver.chat"))) {
|
PlayerChatEvent event = (PlayerChatEvent) Limbo.getInstance().getEventsManager().callEvent(new PlayerChatEvent(this, format, message, false));
|
||||||
String chat = event.getFormat().replace("%name%", username).replace("%message%", event.getMessage());
|
if (!event.isCancelled() && this.hasPermission("limboserver.chat")) {
|
||||||
Limbo.getInstance().getConsole().sendMessage(chat);
|
String chat = event.getFormat().replace("%name%", username).replace("%message%", event.getMessage());
|
||||||
for (Player each : Limbo.getInstance().getPlayers()) {
|
Limbo.getInstance().getConsole().sendMessage(chat);
|
||||||
each.sendMessage(chat, uuid);
|
for (Player each : Limbo.getInstance().getPlayers()) {
|
||||||
|
each.sendMessage(chat, uuid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ level-dimension=minecraft:overworld
|
||||||
allow-flight=false
|
allow-flight=false
|
||||||
|
|
||||||
#Whether chat messages are allowed
|
#Whether chat messages are allowed
|
||||||
|
#Setting this property to false should give more performance but will render the "limboserver.chat" permission powerless
|
||||||
allow-chat=true
|
allow-chat=true
|
||||||
|
|
||||||
#GameMode, survival, creative, adventure, spectator
|
#GameMode, survival, creative, adventure, spectator
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
#Server max players, -1 for no limit
|
||||||
|
max-players=-1
|
||||||
|
|
||||||
|
#Server port
|
||||||
|
server-port=30000
|
||||||
|
|
||||||
|
#Server ip, localhost for local access only
|
||||||
|
server-ip=0.0.0.0
|
||||||
|
|
||||||
|
#Whether this server is behind a bungeecord proxy
|
||||||
|
#Mutually exclusive with velocity-modern and bungee-guard
|
||||||
|
bungeecord=false
|
||||||
|
|
||||||
|
#Whether this server is behind a velocity proxy with modern player forwarding
|
||||||
|
#Mutually exclusive with bungeecord and bungee-guard
|
||||||
|
velocity-modern=false
|
||||||
|
|
||||||
|
#Whether this server is behind a bungeecord proxy with BungeeGuard installed (velocity can do this too for <1.13)
|
||||||
|
#Mutually exclusive with bungeecord and velocity-modern
|
||||||
|
bungee-guard=false
|
||||||
|
|
||||||
|
#For Velocity Modern Forwarding or BungeeGuard a list (separated by `;`) of valid secrets
|
||||||
|
forwarding-secrets=
|
||||||
|
|
||||||
|
#World Name and the Schematic file containing map
|
||||||
|
level-name=world;spawn.schem
|
||||||
|
|
||||||
|
#Dimension, "minecraft:overworld", "minecraft:the_nether" or "minecraft:the_end"
|
||||||
|
level-dimension=minecraft:overworld
|
||||||
|
|
||||||
|
#Whether Flying is allowed
|
||||||
|
allow-flight=false
|
||||||
|
|
||||||
|
#Whether chat messages are allowed
|
||||||
|
allow-chat=true
|
||||||
|
|
||||||
|
#GameMode, survival, creative, adventure, spectator
|
||||||
|
default-gamemode=creative
|
||||||
|
|
||||||
|
#Spawn location
|
||||||
|
world-spawn=world;20.5;17;22.5;-90;0
|
||||||
|
|
||||||
|
#Reduce debug info
|
||||||
|
reduced-debug-info=false
|
||||||
|
|
||||||
|
#The view distance of the server
|
||||||
|
view-distance=6
|
||||||
|
|
||||||
|
#Ticks per second of the server
|
||||||
|
ticks-per-second=5
|
||||||
|
|
||||||
|
#Should a message be printed to the console when a handshake occurs
|
||||||
|
handshake-verbose=true
|
||||||
|
|
||||||
|
#Server list message in Json
|
||||||
|
motd={"text":"","extra":[{"text":"Limbo Server!","color":"yellow"}]}
|
||||||
|
|
||||||
|
#Server list version as string
|
||||||
|
version=Limbo!
|
||||||
Loading…
Reference in New Issue