Fix /cmds shortcuts [modifier] ignoring modifier

This commit is contained in:
UnknownShadow200 2022-03-01 23:56:20 +11:00
parent b85b67be70
commit 60c5698304
7 changed files with 25 additions and 28 deletions

View File

@ -19,10 +19,10 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
namespace MCGalaxy.Commands { namespace MCGalaxy.Commands
{
public class Alias { public class Alias
{
public static List<Alias> coreAliases = new List<Alias>(); public static List<Alias> coreAliases = new List<Alias>();
public static List<Alias> aliases = new List<Alias>(); public static List<Alias> aliases = new List<Alias>();
public string Trigger, Target, Format; public string Trigger, Target, Format;

View File

@ -45,7 +45,7 @@ namespace MCGalaxy.Commands.Info {
string type = args[0].ToLower(); string type = args[0].ToLower();
if (type == "short" || type == "shortcut" || type == "shortcuts") { if (type == "short" || type == "shortcut" || type == "shortcuts") {
PrintShortcuts(p, sort); PrintShortcuts(p, modifier);
} else if (type == "old" || type == "oldmenu" || type == "" || type == "command") { } else if (type == "old" || type == "oldmenu" || type == "" || type == "command") {
PrintRankCommands(p, sort, modifier, p.group, true); PrintRankCommands(p, sort, modifier, p.group, true);
} else if (type == "all" || type == "commandall" || type == "commandsall") { } else if (type == "all" || type == "commandall" || type == "commandsall") {

View File

@ -16,14 +16,12 @@ using System;
using MCGalaxy.Events.EntityEvents; using MCGalaxy.Events.EntityEvents;
using MCGalaxy.Games; using MCGalaxy.Games;
using MCGalaxy.Network; using MCGalaxy.Network;
using MCGalaxy.Maths;
using BlockID = System.UInt16;
namespace MCGalaxy {
namespace MCGalaxy
{
/// <summary> Contains methods related to the management of entities (such as players). </summary> /// <summary> Contains methods related to the management of entities (such as players). </summary>
public static class Entities { public static class Entities
{
public const byte SelfID = 0xFF; public const byte SelfID = 0xFF;
public const ushort CharacterHeight = 51; public const ushort CharacterHeight = 51;

View File

@ -17,12 +17,12 @@
*/ */
using System; using System;
using System.Threading; using System.Threading;
using MCGalaxy.Events.EntityEvents;
using MCGalaxy.Maths; using MCGalaxy.Maths;
namespace MCGalaxy { namespace MCGalaxy
public abstract class Entity { {
public abstract class Entity
{
// Raw orientation/position - access must be threadsafe // Raw orientation/position - access must be threadsafe
volatile uint _rot; volatile uint _rot;
long _pos; long _pos;

View File

@ -17,14 +17,13 @@
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using MCGalaxy.Blocks;
using MCGalaxy.Maths; using MCGalaxy.Maths;
using BlockID = System.UInt16; using BlockID = System.UInt16;
namespace MCGalaxy { namespace MCGalaxy
{
public struct ModelInfo { public struct ModelInfo
{
public readonly string Model; public readonly string Model;
public readonly Vec3S32 BaseSize; public readonly Vec3S32 BaseSize;
public readonly int EyeHeight; public readonly int EyeHeight;

View File

@ -18,11 +18,11 @@
using System; using System;
using MCGalaxy.Maths; using MCGalaxy.Maths;
namespace MCGalaxy { namespace MCGalaxy
{
/// <summary> Represents the position of an entity in the world. </summary> /// <summary> Represents the position of an entity in the world. </summary>
public struct Position : IEquatable<Position> { public struct Position : IEquatable<Position>
{
/// <summary> X fixed-point location in the world. </summary> /// <summary> X fixed-point location in the world. </summary>
public int X; public int X;

View File

@ -16,14 +16,14 @@
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
using System; using System;
using MCGalaxy.Games;
using MCGalaxy.Events.EntityEvents; using MCGalaxy.Events.EntityEvents;
using MCGalaxy.Network; using MCGalaxy.Network;
namespace MCGalaxy { namespace MCGalaxy
{
/// <summary> Contains methods related to the management of tab list of player names. </summary> /// <summary> Contains methods related to the management of tab list of player names. </summary>
public static class TabList { public static class TabList
{
// Want nobody to be at top of list, banned to be bottom of list. // Want nobody to be at top of list, banned to be bottom of list.
const LevelPermission offset = LevelPermission.Nobody; const LevelPermission offset = LevelPermission.Nobody;