Fixed farmland displaying in inventory rollbacks

This commit is contained in:
Intelli 2022-02-24 20:15:48 -07:00
parent 45f9f4316e
commit ddb804ce99
3 changed files with 8 additions and 11 deletions

View File

@ -266,6 +266,7 @@ public class LookupCommand {
if (argAction.contains(4) && argAction.contains(11)) { // a:inventory if (argAction.contains(4) && argAction.contains(11)) { // a:inventory
argExclude.add(Material.FIRE); argExclude.add(Material.FIRE);
argExclude.add(Material.WATER); argExclude.add(Material.WATER);
argExclude.add(Material.FARMLAND);
argExcludeUsers.add("#hopper"); argExcludeUsers.add("#hopper");
} }

View File

@ -183,15 +183,11 @@ public class RollbackRestoreCommand {
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.MISSING_ACTION_USER)); Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.MISSING_ACTION_USER));
return; return;
} }
if (!argExclude.contains(Material.FIRE)) {
argExclude.add(Material.FIRE); argExclude.add(Material.FIRE);
} argExclude.add(Material.WATER);
if (!argExclude.contains(Material.WATER)) { argExclude.add(Material.FARMLAND);
argExclude.add(Material.WATER); argExcludeUsers.add("#hopper");
}
if (!argExcludeUsers.contains("#hopper")) {
argExcludeUsers.add("#hopper");
}
} }
if (g == 1 && (argUsers.size() > 0 || (argUsers.size() == 0 && argRadius != null))) { if (g == 1 && (argUsers.size() > 0 || (argUsers.size() == 0 && argRadius != null))) {

View File

@ -1411,9 +1411,9 @@ public class Rollback extends Queue {
int excludeCount = 0; int excludeCount = 0;
for (Object excludeTarget : excludeList) { for (Object excludeTarget : excludeList) {
// don't display that excluded water/fire in inventory rollbacks // don't display that excluded water/fire/farmland in inventory rollbacks
if (actionList.contains(4) && actionList.contains(11)) { if (actionList.contains(4) && actionList.contains(11)) {
if (excludeTarget.equals(Material.FIRE) || excludeTarget.equals(Material.WATER)) { if (excludeTarget.equals(Material.FIRE) || excludeTarget.equals(Material.WATER) || excludeTarget.equals(Material.FARMLAND)) {
continue; continue;
} }
} }