Fixed - /iris object undo

also added some colors
This commit is contained in:
RePixelatedMC
2023-09-25 14:30:21 +02:00
parent 4d2d51edfa
commit 373e9e9755
2 changed files with 9 additions and 3 deletions

View File

@@ -413,7 +413,7 @@ public class CommandObject implements DecreeExecutor {
ObjectSVC service = Iris.service(ObjectSVC.class);
int actualReverts = Math.min(service.getUndos().size(), amount);
service.revertChanges(actualReverts);
sender().sendMessage("Reverted " + actualReverts + " pastes!");
sender().sendMessage(C.BLUE + "Reverted " + actualReverts + C.BLUE +" pastes!");
}
@Decree(description = "Gets an object wand and grabs the current WorldEdit selection.", aliases = "we", origin = DecreeOrigin.PLAYER, studio = true)

View File

@@ -18,9 +18,11 @@
package com.volmit.iris.core.service;
import com.volmit.iris.Iris;
import com.volmit.iris.util.plugin.IrisService;
import com.volmit.iris.util.scheduling.J;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
@@ -73,7 +75,10 @@ public class ObjectSVC implements IrisService {
while (it.hasNext()) {
Map.Entry<Block, BlockData> entry = it.next();
BlockData data = entry.getValue();
entry.getKey().setBlockData(data, false);
Bukkit.getScheduler().runTask(Iris.instance, () -> {
entry.getKey().setBlockData(data, false);
});
it.remove();
amount++;
@@ -83,4 +88,5 @@ public class ObjectSVC implements IrisService {
}
}
}
}
}