use of io.icker.factions.util.Message in project factions by ickerio.
the class DisbandCommand method run.
@Override
public int run(CommandContext<ServerCommandSource> context) throws CommandSyntaxException {
ServerCommandSource source = context.getSource();
ServerPlayerEntity player = source.getPlayer();
Member member = Member.get(player.getUuid());
Faction faction = member.getFaction();
new Message(player.getName().asString() + " disbanded the faction").send(faction);
faction.remove();
PlayerManager manager = source.getServer().getPlayerManager();
for (ServerPlayerEntity p : manager.getPlayerList()) {
manager.sendCommandTree(p);
}
return 1;
}
use of io.icker.factions.util.Message in project factions by ickerio.
the class ChatEvents method faction.
public static void faction(ServerPlayerEntity sender, Faction faction, String message) {
FactionsMod.LOGGER.info("[" + faction.name + " " + sender.getName().asString() + " -> " + faction.name + "] " + message);
new Message(sender.getName().asString()).add(new Message(" F").format(Formatting.BOLD, faction.color)).filler("»").add(new Message(message).format(Formatting.GRAY)).sendToFactionChat(faction);
}
use of io.icker.factions.util.Message in project factions by ickerio.
the class ChatEvents method memberGlobal.
public static void memberGlobal(ServerPlayerEntity sender, Faction faction, String message) {
FactionsMod.LOGGER.info("[" + faction.name + " " + sender.getName().asString() + " -> All] " + message);
String rank = "";
for (Member member : faction.getMembers()) if (member.uuid.equals(sender.getUuid()))
rank = member.getRank().name().toLowerCase().replace("_", " ");
new Message("").add(new Message(faction.name).format(Formatting.BOLD, faction.color)).add(" " + rank).add(" " + sender.getName().asString()).filler("»").add(new Message(message).format(Formatting.GRAY)).sendToGlobalChat();
}
use of io.icker.factions.util.Message in project factions by ickerio.
the class ChatEvents method global.
public static void global(ServerPlayerEntity sender, String message) {
FactionsMod.LOGGER.info("[" + sender.getName().asString() + " -> All] " + message);
new Message(sender.getName().asString()).filler("»").add(new Message(message).format(Formatting.GRAY)).sendToGlobalChat();
}
Aggregations