mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Now /voice no longer shows + before their name in chat.
This commit is contained in:
parent
c9543e30a0
commit
7b50b25c8a
12
Chat/Chat.cs
12
Chat/Chat.cs
@ -25,7 +25,7 @@ namespace MCGalaxy {
|
||||
|
||||
public static void GlobalChatLevel(Player from, string message, bool showname) {
|
||||
if (showname)
|
||||
message = "<Level>" + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message;
|
||||
message = "<Level>" + from.FullName + ": &f" + message;
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
foreach (Player p in players) {
|
||||
if (p.level == from.level && p.Chatroom == null)
|
||||
@ -40,9 +40,9 @@ namespace MCGalaxy {
|
||||
|
||||
public static void GlobalChatRoom(Player from, string message, bool showname) {
|
||||
string rawMessage = message;
|
||||
if ( showname ) {
|
||||
message = "<GlobalChatRoom> " + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message;
|
||||
}
|
||||
if (showname)
|
||||
message = "<GlobalChatRoom> " + from.FullName + ": &f" + message;
|
||||
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
foreach (Player p in players) {
|
||||
if (p.Chatroom != null)
|
||||
@ -53,9 +53,9 @@ namespace MCGalaxy {
|
||||
|
||||
public static void ChatRoom(Player from, string message, bool showname, string chatroom) {
|
||||
string rawMessage = message;
|
||||
string messageforspy = ( "<ChatRoomSPY: " + chatroom + "> " + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message );
|
||||
string messageforspy = "<ChatRoomSPY: " + chatroom + "> " + from.FullName + ": &f" + message;
|
||||
if (showname)
|
||||
message = "<ChatRoom: " + chatroom + "> " + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message;
|
||||
message = "<ChatRoom: " + chatroom + "> " + from.FullName + ": &f" + message;
|
||||
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
foreach (Player p in players) {
|
||||
|
@ -15,10 +15,8 @@
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
namespace MCGalaxy.Commands {
|
||||
|
||||
public sealed class CmdFlipHeads : Command {
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdFlipHeads : Command {
|
||||
public override string name { get { return "flipheads"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
|
@ -15,8 +15,7 @@
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
namespace MCGalaxy.Commands {
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdHasirc : Command {
|
||||
public override string name { get { return "hasirc"; } }
|
||||
public override string shortcut { get { return "irc"; } }
|
||||
|
@ -40,7 +40,6 @@ namespace MCGalaxy.Commands {
|
||||
who.SendMessage("You have received voice status.");
|
||||
}
|
||||
who.voice = !who.voice;
|
||||
who.voicestring = who.voice ? "&f+" : "";
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
|
@ -15,10 +15,8 @@
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
namespace MCGalaxy.Commands
|
||||
{
|
||||
public sealed class CmdBack : Command
|
||||
{
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdBack : Command {
|
||||
public override string name { get { return "back"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
|
@ -16,6 +16,7 @@
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdMove : Command {
|
||||
public override string name { get { return "move"; } }
|
||||
@ -25,8 +26,7 @@ namespace MCGalaxy.Commands {
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
|
||||
public CmdMove() { }
|
||||
|
||||
public override void Use(Player p, string message)
|
||||
{
|
||||
public override void Use(Player p, string message) {
|
||||
// /move name map
|
||||
// /move x y z
|
||||
// /move name x y z
|
||||
|
@ -19,10 +19,9 @@
|
||||
*/
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
|
||||
public sealed class CmdReport : Command {
|
||||
|
||||
public sealed class CmdReport : Command {
|
||||
public override string name { get { return "report"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.Moderation; } }
|
||||
|
@ -16,6 +16,7 @@
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System.Threading;
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdRide : Command {
|
||||
public override string name { get { return "ride"; } }
|
||||
|
@ -17,6 +17,7 @@
|
||||
*/
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdSummon : Command {
|
||||
public override string name { get { return "summon"; } }
|
||||
|
@ -811,7 +811,8 @@ return;
|
||||
onTrain = false; trainGrab = false;
|
||||
ushort x = (ushort)(pos[0] / 32), y = (ushort)(pos[1] / 32), z = (ushort)(pos[2] / 32);
|
||||
string deathMsg = Block.Props[b].DeathMessage;
|
||||
if (deathMsg != null) Chat.GlobalChatLevel(this, String.Format(deathMsg, ColoredName), false);
|
||||
if (deathMsg != null) Chat.GlobalChatLevel(this, String.Format(deathMsg, ColoredName), false);
|
||||
|
||||
if (b == Block.rockethead) level.MakeExplosion(x, y, z, 0);
|
||||
if (b == Block.creeper) level.MakeExplosion(x, y, z, 1);
|
||||
if (b == Block.rock || b == Block.stone) {
|
||||
|
@ -157,11 +157,11 @@ namespace MCGalaxy {
|
||||
string msg_NT = message, msg_NN = message, msg_NNNT = message;
|
||||
if (showname) {
|
||||
string msg = ": &f" + message;
|
||||
string pre = from.voicestring + from.color + from.prefix;
|
||||
string pre = from.color + from.prefix;
|
||||
message = pre + from.DisplayName + msg; // Titles + Nickname
|
||||
msg_NN = pre + from.truename + msg; // Titles + Account name
|
||||
|
||||
pre = from.voicestring + (from.group.prefix == "" ? "" : "&f" + from.group.prefix);
|
||||
pre = from.group.prefix == "" ? "" : "&f" + from.group.prefix;
|
||||
msg_NT = pre + from.color + from.DisplayName + msg; // Nickname
|
||||
msg_NNNT = pre + from.color + from.truename + msg; // Account name
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user