From 66b2c113ce111fd2fe5063dec93c50514219e906 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 8 Jun 2017 09:01:38 +1000 Subject: [PATCH] Remove unused stuff --- MCGalaxy/CorePlugin/ChatHandler.cs | 18 ++++++++++++------ MCGalaxy/Player/Player.Fields.cs | 10 ---------- MCGalaxy/Player/Player.cs | 6 ------ 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/MCGalaxy/CorePlugin/ChatHandler.cs b/MCGalaxy/CorePlugin/ChatHandler.cs index 31891a765..f1a99a3a9 100644 --- a/MCGalaxy/CorePlugin/ChatHandler.cs +++ b/MCGalaxy/CorePlugin/ChatHandler.cs @@ -29,26 +29,32 @@ namespace MCGalaxy.Core { //DO NOT REMOVE THE TWO COMMANDS BELOW, /PONY AND /RAINBOWDASHLIKESCOOLTHINGS. -EricKilla if (cmd == "pony") { Plugin.CancelPlayerEvent(PlayerEvents.PlayerCommand, p); - if (!MessageCmd.CanSpeak(p, cmd)) return; + if (!MessageCmd.CanSpeak(p, cmd)) return; + int ponycount = p.Extras.GetInt("MCGalaxy_Core_Pony", 0); - if (p.ponycount < 2) { + if (ponycount < 2) { Chat.MessageGlobal("{0} %Sjust so happens to be a proud brony! Everyone give {0} %Sa brohoof!", p.ColoredName); Server.s.CommandUsed(p.name + " used /" + cmd); } else { Player.Message(p, "You have used this command 2 times. You cannot use it anymore! Sorry, Brony!"); } - p.ponycount++; + + ponycount++; + p.Extras.PutInt("MCGalaxy_Core_RD", ponycount); } else if (cmd == "rainbowdashlikescoolthings") { Plugin.CancelPlayerEvent(PlayerEvents.PlayerCommand, p); if (!MessageCmd.CanSpeak(p, cmd)) return; + int rdcount = p.Extras.GetInt("MCGalaxy_Core_RD", 0); - if (p.rdcount < 2) { + if (rdcount < 2) { Chat.MessageGlobal("&4T&6H&eI&aS&3 S&9E&1R&4V&6E&eR &aJ&3U&9S&1T &4G&6O&eT &a2&30 &9P&1E&4R&6C&eE&aN&3T &9C&1O&4O&6L&eE&aR&3!"); Server.s.CommandUsed(p.name + " used /" + cmd); } else { Player.Message(p, "You have used this command 2 times. You cannot use it anymore! Sorry, Brony!"); - } - p.rdcount++; + } + + rdcount++; + p.Extras.PutInt("MCGalaxy_Core_RD", rdcount); } } } diff --git a/MCGalaxy/Player/Player.Fields.cs b/MCGalaxy/Player/Player.Fields.cs index 58016b64c..4cd7fbb67 100644 --- a/MCGalaxy/Player/Player.Fields.cs +++ b/MCGalaxy/Player/Player.Fields.cs @@ -77,7 +77,6 @@ namespace MCGalaxy { public string name; public string DisplayName; - public string realName; public int warn = 0; public byte id; public string ip; @@ -96,8 +95,6 @@ namespace MCGalaxy { public string titlecolor; public int TotalMessagesSent = 0; public int passtries = 0; - public int ponycount = 0; - public int rdcount = 0; public bool hasreadrules = false; public DateTime NextReviewTime, NextEat; public float ReachDistance = 5; @@ -156,7 +153,6 @@ namespace MCGalaxy { public bool adminpen = false; public bool voice = false; - public string voicestring = ""; public bool useCheckpointSpawn = false; public int lastCheckpointIndex = -1; @@ -197,8 +193,6 @@ namespace MCGalaxy { internal BlockDefinition gbBlock, lbBlock; public bool spawned = false; - public bool Mojangaccount { get { return truename.IndexOf('@') >= 0; } } - //Undo internal VolatileArray DrawOps = new VolatileArray(false); internal readonly object pendingDrawOpsLock = new object(); @@ -235,10 +229,6 @@ namespace MCGalaxy { public byte[] rot = new byte[2]; internal Position tempPos; - //ushort[] clippos = new ushort[3] { 0, 0, 0 }; - //byte[] cliprot = new byte[2] { 0, 0 }; - public int consecutivemessages; - // CmdVoteKick public VoteKickChoice voteKickChoice = VoteKickChoice.NotYetVoted; diff --git a/MCGalaxy/Player/Player.cs b/MCGalaxy/Player/Player.cs index c48df0804..78dacb0eb 100644 --- a/MCGalaxy/Player/Player.cs +++ b/MCGalaxy/Player/Player.cs @@ -99,12 +99,6 @@ namespace MCGalaxy { return BlockBindings[RawHeldBlock.RawID]; } - public static string CheckPlayerStatus(Player p) { - if ( p.hidden ) return "hidden"; - if ( p.IsAfk ) return "afk"; - return "active"; - } - public void SetPrefix() { prefix = Game.Referee ? "&2[Ref] " : ""; if (group.prefix != "") prefix += "&f" + group.prefix + color;