mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 20:53:40 -04:00
You can set any rank in /os map perbuild/pervisit
This commit is contained in:
parent
bf03de4f50
commit
755729937f
@ -111,10 +111,12 @@ namespace MCGalaxy.Commands.World {
|
|||||||
args[1], args[2], args[3]);
|
args[1], args[2], args[3]);
|
||||||
} else if (cmd == "PERVISIT") {
|
} else if (cmd == "PERVISIT") {
|
||||||
string rank = value.Length == 0 ? ServerConfig.DefaultRankName : value;
|
string rank = value.Length == 0 ? ServerConfig.DefaultRankName : value;
|
||||||
Command.all.FindByName("PerVisit").Use(p, rank);
|
Group grp = Matcher.FindRanks(p, rank);
|
||||||
|
if (grp != null) p.level.VisitAccess.SetMin(null, grp);
|
||||||
} else if (cmd == "PERBUILD") {
|
} else if (cmd == "PERBUILD") {
|
||||||
string rank = value.Length == 0 ? ServerConfig.DefaultRankName : value;
|
string rank = value.Length == 0 ? ServerConfig.DefaultRankName : value;
|
||||||
Command.all.FindByName("PerBuild").Use(p, rank);
|
Group grp = Matcher.FindRanks(p, rank);
|
||||||
|
if (grp != null) p.level.BuildAccess.SetMin(null, grp);
|
||||||
} else if (cmd == "TEXTURE") {
|
} else if (cmd == "TEXTURE") {
|
||||||
if (value.Length == 0) {
|
if (value.Length == 0) {
|
||||||
Command.all.FindByName("Texture").Use(p, "level normal");
|
Command.all.FindByName("Texture").Use(p, "level normal");
|
||||||
@ -155,7 +157,7 @@ namespace MCGalaxy.Commands.World {
|
|||||||
args = (level + " " + value).SplitSpaces();
|
args = (level + " " + value).SplitSpaces();
|
||||||
Level lvl = newLvl.GenerateMap(p, args);
|
Level lvl = newLvl.GenerateMap(p, args);
|
||||||
if (lvl == null) return;
|
if (lvl == null) return;
|
||||||
SetBuildPerms(p, lvl);
|
SetPerms(p, lvl);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
lvl.Save(true);
|
lvl.Save(true);
|
||||||
@ -165,9 +167,10 @@ namespace MCGalaxy.Commands.World {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetBuildPerms(Player p, Level lvl) {
|
static void SetPerms(Player p, Level lvl) {
|
||||||
lvl.Config.RealmOwner = p.name;
|
lvl.Config.RealmOwner = p.name;
|
||||||
lvl.BuildAccess.Whitelist(null, p.name);
|
lvl.BuildAccess.Whitelist(null, p.name);
|
||||||
|
lvl.VisitAccess.Whitelist(null, p.name);
|
||||||
CmdZone.ZoneAll(lvl, p.name);
|
CmdZone.ZoneAll(lvl, p.name);
|
||||||
|
|
||||||
LevelPermission osPerm = ServerConfig.OSPerbuildDefault;
|
LevelPermission osPerm = ServerConfig.OSPerbuildDefault;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user