mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-24 19:46:34 +01:00
Fix logging
This commit is contained in:
parent
598928053d
commit
990d2fcbb0
@ -1,11 +1,7 @@
|
||||
package com.boydti.fawe.bukkit.logging;
|
||||
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.boydti.fawe.object.FawePlayer;
|
||||
import com.boydti.fawe.object.changeset.FaweChangeSet;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import org.PrimeSoft.blocksHub.BlocksHub;
|
||||
import org.PrimeSoft.blocksHub.IBlocksHubApi;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -20,7 +16,7 @@ public class BlocksHubHook {
|
||||
this.api = this.hub.getApi();
|
||||
}
|
||||
|
||||
public FaweChangeSet getLoggingChangeSet(EditSession session, FaweLimit limit, Extent parent, FaweChangeSet set, FaweQueue queue, FawePlayer<?> player) {
|
||||
public FaweChangeSet getLoggingChangeSet(FaweChangeSet set, FawePlayer<?> player) {
|
||||
return new LoggingChangeSet((FawePlayer<Player>) player, set, api);
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,9 @@ package com.boydti.fawe.bukkit.v0;
|
||||
|
||||
import com.boydti.fawe.bukkit.logging.BlocksHubHook;
|
||||
import com.boydti.fawe.object.EditSessionWrapper;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.boydti.fawe.object.FawePlayer;
|
||||
import com.boydti.fawe.object.changeset.FaweChangeSet;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
|
||||
public class BukkitEditSessionWrapper_0 extends EditSessionWrapper {
|
||||
|
||||
@ -22,10 +19,10 @@ public class BukkitEditSessionWrapper_0 extends EditSessionWrapper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaweChangeSet wrapChangeSet(EditSession session, FaweLimit limit, Extent parent, FaweChangeSet set, FaweQueue queue, FawePlayer<?> player) {
|
||||
public FaweChangeSet wrapChangeSet(FaweChangeSet set, FawePlayer<?> player) {
|
||||
if (this.hook != null) {
|
||||
// If we are doing logging, use a custom logging ChangeSet
|
||||
return hook.getLoggingChangeSet(session, limit, parent, set, queue, player);
|
||||
return hook.getLoggingChangeSet(set, player);
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockType;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
|
||||
public class EditSessionWrapper {
|
||||
|
||||
@ -116,7 +115,7 @@ public class EditSessionWrapper {
|
||||
return minY;
|
||||
}
|
||||
|
||||
public FaweChangeSet wrapChangeSet(EditSession session, FaweLimit limit, Extent parent, FaweChangeSet set, FaweQueue queue, FawePlayer<?> player) {
|
||||
public FaweChangeSet wrapChangeSet(FaweChangeSet set, FawePlayer<?> player) {
|
||||
return set;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.object.EditSessionWrapper;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.boydti.fawe.object.FawePlayer;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
@ -250,6 +251,10 @@ public class EditSession implements Extent {
|
||||
this.bypassAll = wrapExtent(new FastWorldEditExtent(world, queue), bus, event, Stage.BEFORE_CHANGE);
|
||||
this.bypassHistory = (this.extent = wrapExtent(bypassAll, bus, event, Stage.BEFORE_REORDER));
|
||||
if (!fastmode && !(changeSet instanceof NullChangeSet)) {
|
||||
if (player != null) {
|
||||
EditSessionWrapper wrapper = Fawe.imp().getEditSessionWrapper(this);
|
||||
changeSet = wrapper.wrapChangeSet(changeSet, player);
|
||||
}
|
||||
if (combineStages) {
|
||||
changeTask = changeSet;
|
||||
changeSet.addChangeTask(queue);
|
||||
|
Loading…
Reference in New Issue
Block a user