mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Fixes NPE if Prism or CoreProtect are not installed (#87)
This commit is contained in:
parent
532e82472b
commit
54015f668a
@ -94,7 +94,7 @@ public class BanCMD extends PlexCommand
|
|||||||
|
|
||||||
if (rollBack)
|
if (rollBack)
|
||||||
{
|
{
|
||||||
if (plugin.getPrismHook().hasPrism())
|
if (plugin.getPrismHook() != null && plugin.getPrismHook().hasPrism())
|
||||||
{
|
{
|
||||||
PrismParameters parameters = plugin.getPrismHook().prismApi().createParameters();
|
PrismParameters parameters = plugin.getPrismHook().prismApi().createParameters();
|
||||||
parameters.addActionType("block-place");
|
parameters.addActionType("block-place");
|
||||||
@ -119,7 +119,7 @@ public class BanCMD extends PlexCommand
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (plugin.getCoreProtectHook().hasCoreProtect())
|
else if (plugin.getCoreProtectHook() != null && plugin.getCoreProtectHook().hasCoreProtect())
|
||||||
{
|
{
|
||||||
PlexLog.debug("Testing coreprotect");
|
PlexLog.debug("Testing coreprotect");
|
||||||
Bukkit.getGlobalRegionScheduler().run(plugin, scheduledTask ->
|
Bukkit.getGlobalRegionScheduler().run(plugin, scheduledTask ->
|
||||||
|
@ -104,7 +104,7 @@ public class TempbanCMD extends PlexCommand
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else */
|
else */
|
||||||
if (plugin.getCoreProtectHook().hasCoreProtect())
|
if (plugin.getCoreProtectHook() != null && plugin.getCoreProtectHook().hasCoreProtect())
|
||||||
{
|
{
|
||||||
PlexLog.debug("Testing coreprotect");
|
PlexLog.debug("Testing coreprotect");
|
||||||
Bukkit.getAsyncScheduler().runNow(plugin, scheduledTask ->
|
Bukkit.getAsyncScheduler().runNow(plugin, scheduledTask ->
|
||||||
|
Loading…
Reference in New Issue
Block a user