Better help for mute/freeze, add a ConfigByte attribute.

This commit is contained in:
UnknownShadow200 2017-06-28 22:15:00 +10:00
parent 57f468f7b1
commit 565e428256
7 changed files with 14 additions and 14 deletions

View File

@ -58,7 +58,7 @@ namespace MCGalaxy.Commands.Moderation {
public override void Help(Player p) {
Player.Message(p, "%T/freeze [name] [timespan] <reason>");
Player.Message(p, "%HStops [name] from moving for [timespan] time, or until manually unfrozen.");
Player.Message(p, "%HPrevents [name] from moving for [timespan], or until manually unfrozen.");
Player.Message(p, "%HFor <reason>, @number can be used as a shortcut for that rule.");
}
}

View File

@ -66,7 +66,7 @@ namespace MCGalaxy.Commands.Moderation {
public override void Help(Player p) {
Player.Message(p, "%T/mute [player] [timespan] <reason>");
Player.Message(p, "%HMutes or unmutes that player.");
Player.Message(p, "%HMutes player for [timespan], or unmutes that player.");
Player.Message(p, "%HFor <reason>, @number can be used as a shortcut for that rule.");
}
}

View File

@ -45,7 +45,7 @@ namespace MCGalaxy.Commands.World {
if (src == null) return;
if (!Formatter.ValidName(p, dst, "level")) return;
if (LevelInfo.MapExists(dst)) { Player.Message(p, "The level \"" + dst + "\" already exists."); return; }
try {
LevelActions.CopyLevel(src, dst);
} catch (System.IO.IOException) {

View File

@ -19,7 +19,7 @@ using System;
namespace MCGalaxy.Config {
public sealed class ConfigIntAttribute : ConfigAttribute {
public class ConfigIntAttribute : ConfigAttribute {
/// <summary> Minimum integer allowed for a value. </summary>
public int MinValue;

View File

@ -242,7 +242,7 @@ namespace MCGalaxy {
Logger.Log(LogType.UserActivity, "{0} rank changed to {1} on {2}.", type, grp.trueName, lvl.name);
Chat.MessageLevel(lvl, type + " rank changed to " + grp.ColoredName + "%S.");
if (p != null && p.level != lvl)
Player.Message(p, "{0} rank changed to {1} %Son {2}%S.", type, grp.ColoredName, lvl.ColoredName);
Player.Message(p, "{0} rank changed to {1} %Son {2}%S.", type, grp.ColoredName, ColoredName);
}
/// <summary> Messages all player on the level (and source player) notifying them that the
@ -261,7 +261,7 @@ namespace MCGalaxy {
Logger.Log(LogType.UserActivity, "{0} on {1}", msg, lvl.name);
Chat.MessageLevel(lvl, msg);
if (p != null && p.level != lvl)
Player.Message(p, "{0} on %S{1}", msg, lvl.ColoredName);
Player.Message(p, "{0} on %S{1}", msg, ColoredName);
}

View File

@ -50,8 +50,8 @@ namespace MCGalaxy {
public int JailZ;
// Environment settings
[ConfigInt("Weather", "Env", null, 0, 0, 2)]
public int Weather;
[ConfigByte("Weather", "Env", null, 0, 0, 2)]
public byte Weather;
[ConfigString("Texture", "Env", null, "", true, null, NetUtils.StringSize)]
public string Terrain = "";
[ConfigString("TexturePack", "Env", null, "", true, null, NetUtils.StringSize)]
@ -95,11 +95,11 @@ namespace MCGalaxy {
[ConfigInt("weather-fade", "Env", null, 128, short.MinValue, short.MaxValue)]
public int WeatherFade = 128;
/// <summary> The block which will be displayed on the horizon. </summary>
[ConfigInt("HorizonBlock", "Env", null, Block.water, 0, 255)]
public int HorizonBlock = Block.water;
[ConfigByte("HorizonBlock", "Env", null, Block.water)]
public byte HorizonBlock = Block.water;
/// <summary> The block which will be displayed on the edge of the map. </summary>
[ConfigInt("EdgeBlock", "Env", null, Block.blackrock, 0, 255)]
public int EdgeBlock = Block.blackrock;
[ConfigByte("EdgeBlock", "Env", null, Block.blackrock)]
public byte EdgeBlock = Block.blackrock;
/// <summary> Whether exponential fog mode is used client-side. </summary>
[ConfigBool("ExpFog", "Env", null, false)]
public bool ExpFog;

View File

@ -52,7 +52,7 @@ namespace MCGalaxy {
}
public static void SetBlock(Player p, string value, EnvProp prop,
string variable, byte defValue, ref int target) {
string variable, byte defValue, ref byte target) {
if (IsResetString(value)) {
Player.Message(p, "Reset {0} for {1} %Sto normal", variable, p.level.ColoredName);
target = defValue;
@ -113,7 +113,7 @@ namespace MCGalaxy {
}
static bool CheckBlock(Player p, string value, string variable, ref int modify) {
static bool CheckBlock(Player p, string value, string variable, ref byte modify) {
ExtBlock block;
if (!CommandParser.GetBlock(p, value, out block)) return false;