mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Now do partial rank name matching in /viewranks
This commit is contained in:
parent
4336855f80
commit
c2a318ea1d
@ -34,8 +34,8 @@ namespace MCGalaxy.Commands {
|
||||
public override void Use(Player p, string message) {
|
||||
if (message == "") { Player.Message(p, "Available ranks: " + Group.concatList()); return; }
|
||||
Group grp = message.CaselessEq("banned") ?
|
||||
Group.findPerm(LevelPermission.Banned) : Group.Find(message);
|
||||
if (grp == null) { Player.Message(p, "Could not find group"); return; }
|
||||
Group.findPerm(LevelPermission.Banned) : Group.FindMatches(p, message);
|
||||
if (grp == null) return;
|
||||
|
||||
string list = grp.playerList.All().Join(", ");
|
||||
if (list.Length == 0) {
|
||||
|
@ -18,7 +18,7 @@
|
||||
using MCGalaxy.Games;
|
||||
|
||||
namespace MCGalaxy.Commands {
|
||||
public sealed class CmdSpawn : Command {
|
||||
public sealed class CmdSpawn : Command {
|
||||
public override string name { get { return "spawn"; } }
|
||||
public override string shortcut { get { return ""; } }
|
||||
public override string type { get { return CommandTypes.World; } }
|
||||
|
@ -161,7 +161,7 @@ namespace MCGalaxy.Eco {
|
||||
int lasttrueprice = 0;
|
||||
foreach (Group group in Group.GroupList) {
|
||||
if (group.Permission > Group.Find(MaxRank).Permission) break;
|
||||
if (group.Permission <= Group.Find(Server.defaultRank).Permission) continue;
|
||||
if (group.Permission <= Group.standard.Permission) continue;
|
||||
|
||||
Rank rank = FindRank(group.name);
|
||||
if (rank == null) {
|
||||
|
@ -121,8 +121,8 @@ namespace MCGalaxy.Games
|
||||
}
|
||||
//Map stuff
|
||||
lvl.setPhysics(3);
|
||||
lvl.permissionbuild = Group.Find(Server.defaultRank).Permission;
|
||||
lvl.permissionvisit = Group.Find(Server.defaultRank).Permission;
|
||||
lvl.permissionbuild = Group.standard.Permission;
|
||||
lvl.permissionvisit = Group.standard.Permission;
|
||||
lvl.Killer = true;
|
||||
//Seting Up Some Player stuff
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ namespace MCGalaxy {
|
||||
public static void MessageBlock(Player p, string action, byte block) {
|
||||
StringBuilder builder = new StringBuilder("Only ");
|
||||
Block.Blocks perms = Block.BlockList[block];
|
||||
Formatter.PrintRanks(perms.lowestRank, perms.allow, perms.disallow, builder);
|
||||
PrintRanks(perms.lowestRank, perms.allow, perms.disallow, builder);
|
||||
|
||||
builder.Append( " %Scan ").Append(action);
|
||||
builder.Append(Block.Name(block)).Append(".");
|
||||
|
Loading…
x
Reference in New Issue
Block a user