mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Fix undo and redo broken by a precondition.
This commit is contained in:
parent
98e55bede0
commit
8ce757631a
@ -198,7 +198,7 @@ public class LocalSession {
|
|||||||
* @param player the player
|
* @param player the player
|
||||||
* @return whether anything was undone
|
* @return whether anything was undone
|
||||||
*/
|
*/
|
||||||
public EditSession undo(BlockBag newBlockBag, LocalPlayer player) {
|
public EditSession undo(@Nullable BlockBag newBlockBag, LocalPlayer player) {
|
||||||
return undo(newBlockBag, (Player) player);
|
return undo(newBlockBag, (Player) player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,8 +209,7 @@ public class LocalSession {
|
|||||||
* @param player the player
|
* @param player the player
|
||||||
* @return whether anything was undone
|
* @return whether anything was undone
|
||||||
*/
|
*/
|
||||||
public EditSession undo(BlockBag newBlockBag, Player player) {
|
public EditSession undo(@Nullable BlockBag newBlockBag, Player player) {
|
||||||
checkNotNull(newBlockBag);
|
|
||||||
checkNotNull(player);
|
checkNotNull(player);
|
||||||
--historyPointer;
|
--historyPointer;
|
||||||
if (historyPointer >= 0) {
|
if (historyPointer >= 0) {
|
||||||
@ -234,7 +233,7 @@ public class LocalSession {
|
|||||||
* @param player the player
|
* @param player the player
|
||||||
* @return whether anything was redone
|
* @return whether anything was redone
|
||||||
*/
|
*/
|
||||||
public EditSession redo(BlockBag newBlockBag, LocalPlayer player) {
|
public EditSession redo(@Nullable BlockBag newBlockBag, LocalPlayer player) {
|
||||||
return redo(newBlockBag, (Player) player);
|
return redo(newBlockBag, (Player) player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,8 +244,7 @@ public class LocalSession {
|
|||||||
* @param player the player
|
* @param player the player
|
||||||
* @return whether anything was redone
|
* @return whether anything was redone
|
||||||
*/
|
*/
|
||||||
public EditSession redo(BlockBag newBlockBag, Player player) {
|
public EditSession redo(@Nullable BlockBag newBlockBag, Player player) {
|
||||||
checkNotNull(newBlockBag);
|
|
||||||
checkNotNull(player);
|
checkNotNull(player);
|
||||||
if (historyPointer < history.size()) {
|
if (historyPointer < history.size()) {
|
||||||
EditSession editSession = history.get(historyPointer);
|
EditSession editSession = history.get(historyPointer);
|
||||||
|
Loading…
Reference in New Issue
Block a user