Now /voice no longer shows + before their name in chat.

This commit is contained in:
UnknownShadow200 2016-08-02 18:58:17 +10:00
parent c9543e30a0
commit 7b50b25c8a
11 changed files with 21 additions and 25 deletions

View File

@ -25,7 +25,7 @@ namespace MCGalaxy {
public static void GlobalChatLevel(Player from, string message, bool showname) { public static void GlobalChatLevel(Player from, string message, bool showname) {
if (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; Player[] players = PlayerInfo.Online.Items;
foreach (Player p in players) { foreach (Player p in players) {
if (p.level == from.level && p.Chatroom == null) if (p.level == from.level && p.Chatroom == null)
@ -40,9 +40,9 @@ namespace MCGalaxy {
public static void GlobalChatRoom(Player from, string message, bool showname) { public static void GlobalChatRoom(Player from, string message, bool showname) {
string rawMessage = message; string rawMessage = message;
if ( showname ) { if (showname)
message = "<GlobalChatRoom> " + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message; message = "<GlobalChatRoom> " + from.FullName + ": &f" + message;
}
Player[] players = PlayerInfo.Online.Items; Player[] players = PlayerInfo.Online.Items;
foreach (Player p in players) { foreach (Player p in players) {
if (p.Chatroom != null) if (p.Chatroom != null)
@ -53,9 +53,9 @@ namespace MCGalaxy {
public static void ChatRoom(Player from, string message, bool showname, string chatroom) { public static void ChatRoom(Player from, string message, bool showname, string chatroom) {
string rawMessage = message; 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) 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; Player[] players = PlayerInfo.Online.Items;
foreach (Player p in players) { foreach (Player p in players) {

View File

@ -16,9 +16,7 @@
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands {
public sealed class CmdFlipHeads : Command { public sealed class CmdFlipHeads : Command {
public override string name { get { return "flipheads"; } } public override string name { get { return "flipheads"; } }
public override string shortcut { get { return ""; } } public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } } public override string type { get { return CommandTypes.Other; } }

View File

@ -16,7 +16,6 @@
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands {
public sealed class CmdHasirc : Command { public sealed class CmdHasirc : Command {
public override string name { get { return "hasirc"; } } public override string name { get { return "hasirc"; } }
public override string shortcut { get { return "irc"; } } public override string shortcut { get { return "irc"; } }

View File

@ -40,7 +40,6 @@ namespace MCGalaxy.Commands {
who.SendMessage("You have received voice status."); who.SendMessage("You have received voice status.");
} }
who.voice = !who.voice; who.voice = !who.voice;
who.voicestring = who.voice ? "&f+" : "";
} }
public override void Help(Player p) { public override void Help(Player p) {

View File

@ -15,10 +15,8 @@
or implied. See the Licenses for the specific language governing or implied. See the Licenses for the specific language governing
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
namespace MCGalaxy.Commands namespace MCGalaxy.Commands {
{ public sealed class CmdBack : Command {
public sealed class CmdBack : Command
{
public override string name { get { return "back"; } } public override string name { get { return "back"; } }
public override string shortcut { get { return ""; } } public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } } public override string type { get { return CommandTypes.Other; } }

View File

@ -16,6 +16,7 @@
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
using System; using System;
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands {
public sealed class CmdMove : Command { public sealed class CmdMove : Command {
public override string name { get { return "move"; } } public override string name { get { return "move"; } }
@ -25,8 +26,7 @@ namespace MCGalaxy.Commands {
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } } public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public CmdMove() { } public CmdMove() { }
public override void Use(Player p, string message) public override void Use(Player p, string message) {
{
// /move name map // /move name map
// /move x y z // /move x y z
// /move name x y z // /move name x y z

View File

@ -19,10 +19,9 @@
*/ */
using System; using System;
using System.IO; using System.IO;
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands {
public sealed class CmdReport : Command { public sealed class CmdReport : Command {
public override string name { get { return "report"; } } public override string name { get { return "report"; } }
public override string shortcut { get { return ""; } } public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Moderation; } } public override string type { get { return CommandTypes.Moderation; } }

View File

@ -16,6 +16,7 @@
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
using System.Threading; using System.Threading;
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands {
public sealed class CmdRide : Command { public sealed class CmdRide : Command {
public override string name { get { return "ride"; } } public override string name { get { return "ride"; } }

View File

@ -17,6 +17,7 @@
*/ */
using System; using System;
using System.Threading; using System.Threading;
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands {
public sealed class CmdSummon : Command { public sealed class CmdSummon : Command {
public override string name { get { return "summon"; } } public override string name { get { return "summon"; } }

View File

@ -812,6 +812,7 @@ return;
ushort x = (ushort)(pos[0] / 32), y = (ushort)(pos[1] / 32), z = (ushort)(pos[2] / 32); ushort x = (ushort)(pos[0] / 32), y = (ushort)(pos[1] / 32), z = (ushort)(pos[2] / 32);
string deathMsg = Block.Props[b].DeathMessage; 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.rockethead) level.MakeExplosion(x, y, z, 0);
if (b == Block.creeper) level.MakeExplosion(x, y, z, 1); if (b == Block.creeper) level.MakeExplosion(x, y, z, 1);
if (b == Block.rock || b == Block.stone) { if (b == Block.rock || b == Block.stone) {

View File

@ -157,11 +157,11 @@ namespace MCGalaxy {
string msg_NT = message, msg_NN = message, msg_NNNT = message; string msg_NT = message, msg_NN = message, msg_NNNT = message;
if (showname) { if (showname) {
string msg = ": &f" + message; 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 message = pre + from.DisplayName + msg; // Titles + Nickname
msg_NN = pre + from.truename + msg; // Titles + Account name 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_NT = pre + from.color + from.DisplayName + msg; // Nickname
msg_NNNT = pre + from.color + from.truename + msg; // Account name msg_NNNT = pre + from.color + from.truename + msg; // Account name
} }