mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-03 06:16:19 +00:00
Fixed - /iris object undo
also added some colors
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user