[Idea]: Folia support for OpenInv #196

Closed
reabuc wants to merge 137 commits from master into master
59 changed files with 4165 additions and 1869 deletions
Showing only changes of commit f78a5b4fba - Show all commits

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011-2021 lishid. All rights reserved.
* Copyright (C) 2011-2022 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -105,7 +105,8 @@ public class SpecialPlayerInventory extends Inventory implements ISpecialPlayerI
@Override
public boolean isInUse() {
return !this.getViewers().isEmpty();
List<HumanEntity> viewers = this.getViewers();
return viewers.size() > 1 || !viewers.isEmpty() && !viewers.get(0).getUniqueId().equals(this.player.getUUID());
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011-2021 lishid. All rights reserved.
* Copyright (C) 2011-2022 lishid. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -105,7 +105,8 @@ public class SpecialPlayerInventory extends Inventory implements ISpecialPlayerI
@Override
public boolean isInUse() {
return !this.getViewers().isEmpty();
List<HumanEntity> viewers = this.getViewers();
return viewers.size() > 1 || !viewers.isEmpty() && !viewers.get(0).getUniqueId().equals(this.player.getUUID());
}
@Override