mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
[Forge] Better handle null platform field in ForgeWorldEdit.
This commit is contained in:
parent
6e739b3000
commit
7eb487aef7
@ -106,7 +106,7 @@ public class ForgeWorldEdit {
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void serverAboutToSTart(FMLServerAboutToStartEvent event) {
|
||||
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
|
||||
if (this.platform != null) {
|
||||
logger.warning("FMLServerStartingEvent occurred when FMLServerStoppingEvent hasn't");
|
||||
WorldEdit.getInstance().getPlatformManager().unregister(platform);
|
||||
@ -144,6 +144,11 @@ public class ForgeWorldEdit {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (platform == null) {
|
||||
logger.warning("WorldEdit didn't initialize correctly! Please report this error.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!platform.isHookingEvents()) return; // We have to be told to catch these events
|
||||
|
||||
if (event.useItem == Result.DENY || event.entity.worldObj.isRemote) return;
|
||||
|
Loading…
Reference in New Issue
Block a user