mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Secret commands now log who used them to server logs and can't be used when muted
This commit is contained in:
parent
43f1cb276f
commit
c856372f07
@ -17,6 +17,7 @@
|
||||
*/
|
||||
using System;
|
||||
using MCGalaxy.Events;
|
||||
using MCGalaxy.Commands.Chatting;
|
||||
|
||||
namespace MCGalaxy.Core {
|
||||
|
||||
@ -27,23 +28,27 @@ 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 (p.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++;
|
||||
Plugin.CancelPlayerEvent(PlayerEvents.PlayerCommand, p);
|
||||
} else if (cmd == "rainbowdashlikescoolthings") {
|
||||
Plugin.CancelPlayerEvent(PlayerEvents.PlayerCommand, p);
|
||||
if (!MessageCmd.CanSpeak(p, cmd)) return;
|
||||
|
||||
if (p.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!");
|
||||
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++;
|
||||
Plugin.CancelPlayerEvent(PlayerEvents.PlayerCommand, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user