mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
fix empty inbox erroring
This commit is contained in:
parent
4768db2137
commit
f355cb7320
@ -28,8 +28,12 @@ namespace MCGalaxy.Commands.Chatting {
|
||||
const int i_text = 0, i_sent = 1, i_from = 2;
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
if (!Database.TableExists("Inbox" + p.name)) {
|
||||
Player.Message(p, "Your inbox is empty."); return;
|
||||
}
|
||||
|
||||
List<string[]> entries = Database.GetRows("Inbox" + p.name, "Contents,TimeSent,PlayerFrom",
|
||||
"ORDER BY TimeSent");
|
||||
"ORDER BY TimeSent");
|
||||
if (entries.Count == 0) {
|
||||
Player.Message(p, "Your inbox is empty."); return;
|
||||
}
|
||||
|
@ -75,9 +75,7 @@ namespace MCGalaxy.Commands.Building {
|
||||
return true;
|
||||
}
|
||||
|
||||
byte temp = 0;
|
||||
if (!CommandParser.GetByte(p, arg, "Value", ref temp)) return false;
|
||||
value = (byte)temp;
|
||||
if (!CommandParser.GetByte(p, arg, "Value", ref value)) return false;
|
||||
|
||||
switch (name) {
|
||||
case "drop": type = PhysicsArgs.Drop; return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user