mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-27 07:11:04 -04:00
Bots should not rotate on spawn (Thanks goodlyay), j/join should alias to /goto. (Thanks azmi2299), hidden players should not show up in .who (Thanks FabTheZen).
This commit is contained in:
parent
395a59a182
commit
e267b31d4f
@ -64,7 +64,7 @@ namespace MCGalaxy.Commands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Help(Player p) {
|
public override void Help(Player p) {
|
||||||
Player.SendMessage(p, "/pcount - Lists the clients players are using, and who uses which client.");
|
Player.SendMessage(p, "/pclients - Lists the clients players are using, and who uses which client.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,10 @@ namespace MCGalaxy.Commands
|
|||||||
public CmdPlayers() { }
|
public CmdPlayers() { }
|
||||||
|
|
||||||
public override void Use(Player p, string message) {
|
public override void Use(Player p, string message) {
|
||||||
DisplayPlayers(p, message, text => Player.SendMessage(p, text));
|
DisplayPlayers(p, message, text => Player.SendMessage(p, text), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DisplayPlayers(Player p, string message, Action<string> output) {
|
public static void DisplayPlayers(Player p, string message, Action<string> output, bool showHidden) {
|
||||||
if (message != "") {
|
if (message != "") {
|
||||||
Group grp = Group.Find(message);
|
Group grp = Group.Find(message);
|
||||||
if( grp == null ) {
|
if( grp == null ) {
|
||||||
@ -45,6 +45,7 @@ namespace MCGalaxy.Commands
|
|||||||
|
|
||||||
foreach (Player pl in PlayerInfo.players) {
|
foreach (Player pl in PlayerInfo.players) {
|
||||||
if (pl.group != grp) continue;
|
if (pl.group != grp) continue;
|
||||||
|
if (pl.hidden && !showHidden) continue;
|
||||||
if (!pl.hidden || p == null || p.group.Permission > LevelPermission.Operator) {
|
if (!pl.hidden || p == null || p.group.Permission > LevelPermission.Operator) {
|
||||||
string name = Colors.StripColours(pl.DisplayName);
|
string name = Colors.StripColours(pl.DisplayName);
|
||||||
if (Server.afkset.Contains(pl.name)) name += "-afk";
|
if (Server.afkset.Contains(pl.name)) name += "-afk";
|
||||||
@ -75,6 +76,7 @@ namespace MCGalaxy.Commands
|
|||||||
int totalPlayers = 0;
|
int totalPlayers = 0;
|
||||||
|
|
||||||
foreach (Player pl in PlayerInfo.players) {
|
foreach (Player pl in PlayerInfo.players) {
|
||||||
|
if (pl.hidden && !showHidden) continue;
|
||||||
if (!pl.hidden || p == null || p.group.Permission > LevelPermission.Operator) {
|
if (!pl.hidden || p == null || p.group.Permission > LevelPermission.Operator) {
|
||||||
totalPlayers++;
|
totalPlayers++;
|
||||||
string name = Colors.StripColours(pl.DisplayName);
|
string name = Colors.StripColours(pl.DisplayName);
|
||||||
|
@ -171,7 +171,7 @@ namespace MCGalaxy {
|
|||||||
string ircCmd = parts[0].ToLower();
|
string ircCmd = parts[0].ToLower();
|
||||||
if (ircCmd == ".who" || ircCmd == ".players") {
|
if (ircCmd == ".who" || ircCmd == ".players") {
|
||||||
try {
|
try {
|
||||||
CmdPlayers.DisplayPlayers(null, "", text => Pm(user.Nick, text));
|
CmdPlayers.DisplayPlayers(null, "", text => Pm(user.Nick, text), false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Server.ErrorLog(e);
|
Server.ErrorLog(e);
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ namespace MCGalaxy {
|
|||||||
string ircCmd = parts[0].ToLower();
|
string ircCmd = parts[0].ToLower();
|
||||||
if (ircCmd == ".who" || ircCmd == ".players") {
|
if (ircCmd == ".who" || ircCmd == ".players") {
|
||||||
try {
|
try {
|
||||||
CmdPlayers.DisplayPlayers(null, "", text => Say(text, false, true));
|
CmdPlayers.DisplayPlayers(null, "", text => Say(text, false, true), false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Server.ErrorLog(e);
|
Server.ErrorLog(e);
|
||||||
}
|
}
|
||||||
|
@ -2035,6 +2035,8 @@ return;
|
|||||||
case "zz": cmd = "static"; message = "cuboid " + message; break;
|
case "zz": cmd = "static"; message = "cuboid " + message; break;
|
||||||
case "fetch": cmd = "summon"; break;
|
case "fetch": cmd = "summon"; break;
|
||||||
case "ranks": cmd = "help"; message = "ranks"; break;
|
case "ranks": cmd = "help"; message = "ranks"; break;
|
||||||
|
case "j":
|
||||||
|
case "join": cmd = "goto"; break;
|
||||||
|
|
||||||
default: retry = false; break; //Unknown command, then
|
default: retry = false; break; //Unknown command, then
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@ namespace MCGalaxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
movement = false;
|
||||||
|
|
||||||
if (Waypoints.Count == 0)
|
if (Waypoints.Count == 0)
|
||||||
{
|
{
|
||||||
@ -115,7 +116,7 @@ namespace MCGalaxy {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool skip = false;
|
bool skip = false;
|
||||||
movement = false;
|
|
||||||
|
|
||||||
retry: switch (Waypoints[currentPoint].type)
|
retry: switch (Waypoints[currentPoint].type)
|
||||||
{
|
{
|
||||||
@ -270,7 +271,7 @@ namespace MCGalaxy {
|
|||||||
if (currentPoint == Waypoints.Count) currentPoint = 0;
|
if (currentPoint == Waypoints.Count) currentPoint = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!movement)
|
if (!movement && Waypoints.Count > 0)
|
||||||
{
|
{
|
||||||
if (rot[0] < 245) rot[0] += 8;
|
if (rot[0] < 245) rot[0] += 8;
|
||||||
else rot[0] = 0;
|
else rot[0] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user