Fix /cs [number] then doing /paste (without having copied anything) causing an error

This commit is contained in:
UnknownShadow200 2017-12-23 09:48:31 +11:00
parent 44768389db
commit b6f53cf60f

View File

@ -34,7 +34,7 @@ namespace MCGalaxy.Commands.Building {
}
public override void Use(Player p, string message) {
if (p.CopySlots[p.CurrentCopySlot] == null) {
if (p.CurrentCopySlot >= p.CopySlots.Count || p.CopySlots[p.CurrentCopySlot] == null) {
Player.Message(p, "You haven't copied anything yet"); return;
}