From b6f53cf60f0fda5091f9f05fed4126671a936c5c Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 23 Dec 2017 09:48:31 +1100 Subject: [PATCH] Fix /cs [number] then doing /paste (without having copied anything) causing an error --- MCGalaxy/Commands/building/CmdPaste.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MCGalaxy/Commands/building/CmdPaste.cs b/MCGalaxy/Commands/building/CmdPaste.cs index 556828782..509a36eb6 100644 --- a/MCGalaxy/Commands/building/CmdPaste.cs +++ b/MCGalaxy/Commands/building/CmdPaste.cs @@ -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; }