Fix WorldEdit integration stopping edits
It's been only more than a year, it's fine
This commit is contained in:
parent
e4548069dc
commit
dcd3ff31db
4 changed files with 41 additions and 43 deletions
|
@ -1,13 +1,12 @@
|
|||
package de.jaschastarke.minecraft.limitedcreative;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import de.jaschastarke.hooking.BooleanHooker;
|
||||
import de.jaschastarke.hooking.GetHooker;
|
||||
import de.jaschastarke.minecraft.limitedcreative.hooks.MultiVerseHooks;
|
||||
import de.jaschastarke.minecraft.limitedcreative.hooks.PlayerCheckHooker;
|
||||
import de.jaschastarke.minecraft.limitedcreative.hooks.WorldTypeHooker;
|
||||
import de.jaschastarke.minecraft.limitedcreative.hooks.xAuthHooks;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public final class Hooks {
|
||||
public static PlayerCheckHooker IsLoggedIn = new PlayerCheckHooker(true);
|
||||
|
@ -53,7 +52,8 @@ public final class Hooks {
|
|||
public static boolean isAuthMePresent() {
|
||||
if (isPluginEnabled("AuthMe")) {
|
||||
try {
|
||||
return Class.forName("uk.org.whoami.authme.api.API") != null;
|
||||
Class.forName("uk.org.whoami.authme.api.API");
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -64,7 +64,8 @@ public final class Hooks {
|
|||
public static boolean isXAuth20Present() {
|
||||
if (isPluginEnabled("xAuth")) {
|
||||
try {
|
||||
return Class.forName("com.cypherx.xauth.xAuth") != null;
|
||||
Class.forName("com.cypherx.xauth.xAuth");
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ public class ModInventories extends CoreModule<LimitedCreative> {
|
|||
return "Inventory";
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void initialize(ModuleEntry<IModule> entry) {
|
||||
super.initialize(entry);
|
||||
|
|
|
@ -167,9 +167,7 @@ public class BlockStateCommand extends BukkitCommand implements IHelpDescribed {
|
|||
final BlockVector3 min = selection.getMinimumPoint();
|
||||
final BlockVector3 max = selection.getMaximumPoint();
|
||||
|
||||
mod.getPlugin().getServer().getScheduler().runTaskAsynchronously(mod.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mod.getPlugin().getServer().getScheduler().runTaskAsynchronously(mod.getPlugin(), () -> {
|
||||
if (mod.isDebug())
|
||||
mod.getLog().debug("Scheduler: Asynchronous Task run");
|
||||
DBTransaction update = mod.getModel().groupUpdate();
|
||||
|
@ -203,7 +201,6 @@ public class BlockStateCommand extends BukkitCommand implements IHelpDescribed {
|
|||
update.finish();
|
||||
|
||||
context.response(L("command.blockstate.command_updated", count));
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public class EditSessionExtent extends AbstractDelegateExtent {
|
|||
|
||||
mod.getModel().setState(s);
|
||||
}
|
||||
super.setBlock(pt, newBlock);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue