Various sender reference improvements. Fixes MassiveCraft/Factions#726.

This commit is contained in:
Olof Larsson
2014-12-10 10:27:56 +01:00
parent 3d93d07c99
commit 6ab443c8b7
2 changed files with 25 additions and 1 deletions

View File

@ -471,6 +471,20 @@ public class EngineMain extends EngineAbstract
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onChunksChange(EventFactionsChunksChange event)
{
// For security reasons we block the chunk change on any error since an error might block security checks from happening.
try
{
onChunksChangeInner(event);
}
catch (Throwable throwable)
{
event.setCancelled(true);
throwable.printStackTrace();
}
}
public void onChunksChangeInner(EventFactionsChunksChange event)
{
// Args
final MPlayer msender = event.getMSender();