mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Added /clearhistory and /clearclipboard.
This commit is contained in:
parent
4c7e14a76b
commit
c70a7914da
@ -41,6 +41,7 @@ public class WorldEdit extends Plugin {
|
|||||||
commands.put("/editpos2", "Set editing position #2");
|
commands.put("/editpos2", "Set editing position #2");
|
||||||
commands.put("/editundo", "Undo");
|
commands.put("/editundo", "Undo");
|
||||||
commands.put("/editredo", "Redo");
|
commands.put("/editredo", "Redo");
|
||||||
|
commands.put("/clearhistory", "Clear history");
|
||||||
commands.put("/editsize", "Get size of selected region");
|
commands.put("/editsize", "Get size of selected region");
|
||||||
commands.put("/editset", "<Type> - Set all blocks inside region");
|
commands.put("/editset", "<Type> - Set all blocks inside region");
|
||||||
commands.put("/editreplace", "<ID> - Replace all existing blocks inside region");
|
commands.put("/editreplace", "<ID> - Replace all existing blocks inside region");
|
||||||
@ -230,6 +231,18 @@ public class WorldEdit extends Plugin {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Clear undo history
|
||||||
|
} else if (split[0].equalsIgnoreCase("/clearhistory")) {
|
||||||
|
session.clearHistory();
|
||||||
|
player.sendMessage(Colors.LightPurple + "History cleared.");;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// Clear clipboard
|
||||||
|
} else if (split[0].equalsIgnoreCase("/clearclipboard")) {
|
||||||
|
session.setClipboard(null);
|
||||||
|
player.sendMessage(Colors.LightPurple + "Clipboard cleared.");;
|
||||||
|
return true;
|
||||||
|
|
||||||
// Paste
|
// Paste
|
||||||
} else if (split[0].equalsIgnoreCase("/editpasteair") ||
|
} else if (split[0].equalsIgnoreCase("/editpasteair") ||
|
||||||
split[0].equalsIgnoreCase("/editpaste")) {
|
split[0].equalsIgnoreCase("/editpaste")) {
|
||||||
|
@ -34,6 +34,14 @@ public class WorldEditSession {
|
|||||||
private int historyPointer = 0;
|
private int historyPointer = 0;
|
||||||
private RegionClipboard clipboard;
|
private RegionClipboard clipboard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear history.
|
||||||
|
*/
|
||||||
|
public void clearHistory() {
|
||||||
|
history.clear();
|
||||||
|
historyPointer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the edit session.
|
* Get the edit session.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user