Merge pull request #17 from ThuverX/master

Added setTitle to Inventory
This commit is contained in:
TheMode 2020-07-28 18:39:20 +02:00 committed by GitHub
commit db6fe176b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,19 @@ public class Inventory implements InventoryModifier, InventoryClickHandler, View
return title;
}
public String setTitle(String title){
this.title = title;
OpenWindowPacket packet = new OpenWindowPacket();
packet.windowId = getWindowId();
packet.windowType = getInventoryType().getWindowType();
packet.title = title;
sendPacketToViewersAndSelf(packet);
update();
}
public byte getWindowId() {
return id;
}