Hotfix TPSZone
Dieser Commit ist enthalten in:
Ursprung
1e6c349880
Commit
dc92ce6fda
@ -37,10 +37,9 @@ import java.util.Map;
|
|||||||
public class SWInventory implements Listener {
|
public class SWInventory implements Listener {
|
||||||
|
|
||||||
final Player player;
|
final Player player;
|
||||||
private final Map<Integer, InvCallback> callbacks = new HashMap<>();
|
final Map<Integer, InvCallback> callbacks = new HashMap<>();
|
||||||
final Inventory inventory;
|
final Inventory inventory;
|
||||||
|
|
||||||
|
|
||||||
public SWInventory(Player p, int size, String t){
|
public SWInventory(Player p, int size, String t){
|
||||||
player = p;
|
player = p;
|
||||||
inventory = Bukkit.createInventory(p, size, t);
|
inventory = Bukkit.createInventory(p, size, t);
|
||||||
|
@ -46,13 +46,15 @@ public class SWListInv<T> extends SWInventory {
|
|||||||
callback = c;
|
callback = c;
|
||||||
elements = l;
|
elements = l;
|
||||||
page = 0;
|
page = 0;
|
||||||
setCallback(-999, (ClickType click) -> player.closeInventory());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void open(){
|
public void open(){
|
||||||
opened = true;
|
opened = true;
|
||||||
inventory.clear();
|
inventory.clear();
|
||||||
|
callbacks.clear();
|
||||||
|
setCallback(-999, (ClickType click) -> player.closeInventory());
|
||||||
|
|
||||||
if(elements.size() > 54){
|
if(elements.size() > 54){
|
||||||
if(page != 0)
|
if(page != 0)
|
||||||
setItem(45, SWItem.getDye(10), (byte)10, "§eSeite zurück", (ClickType click) -> {
|
setItem(45, SWItem.getDye(10), (byte)10, "§eSeite zurück", (ClickType click) -> {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren