Clean up player references even on exception.

This commit is contained in:
Olof Larsson 2014-10-22 07:53:56 +02:00
parent b083182291
commit 8fc5707061

View File

@ -247,6 +247,8 @@ public class MassiveCommand
} }
} }
try
{
// Set Sender Variables // Set Sender Variables
this.sender = sender; this.sender = sender;
this.senderIsConsole = true; this.senderIsConsole = true;
@ -260,12 +262,15 @@ public class MassiveCommand
if ( ! isValidCall(this.sender, this.getArgs())) return; if ( ! isValidCall(this.sender, this.getArgs())) return;
perform(); perform();
}
finally
{
// Unset Sender Variables // Unset Sender Variables
this.sender = null; this.sender = null;
this.me = null; this.me = null;
this.unsetSenderVars(); this.unsetSenderVars();
} }
}
public void fixSenderVars() public void fixSenderVars()
{ {