Comments (4)
In the InventoryGui class we can see the event is cancelled ((here))
I'm really not sure what is causing this. Are the items the user moves ghost items when they exit the gui? If so that is even more strange.
from servergui.
In the InventoryGui class we can see the event is cancelled ((here))
I'm really not sure what is causing this. Are the items the user moves ghost items when they exit the gui? If so that is even more strange.
having looked at the code there i think the cancel click event is being called to early, from my understanding of that code its being called and canceled when the gui is opened.
instead it should be called during the onClick() event of an opened gui.
example: add the cansel event click at the beginning of this then do ur custom click event code after.
public void onClick(InventoryClick click) {
if (clickEvent != null) clickEvent.accept(this, click);
ItemButton button = slot(click.slot());
if (button != null) button.click(click);
}
this might be where this bug is arising from.
from servergui.
In the build
function we call i.onClick(this::onClickCancel);
which registers the click callback to the onClickCancel(InventoryClick e)
function.
This is only called when a player clicks it.
from servergui.
In the
build
function we calli.onClick(this::onClickCancel);
which registers the click callback to theonClickCancel(InventoryClick e)
function.This is only called when a player clicks it.
Checking over your code the only place that I can see where "i.onClick(this::onClickCancel);" is two functions:
public void open(Player player)
public void openSync(Player player) {
Both of thease only handle the opening of the GUI Interface, and do not conver any GUI interaction events sutch as (onClick) event.
from servergui.
Related Issues (13)
- Server Switching
- [BUG] Not Working HOT 8
- Question HOT 1
- 1.19 Update Request HOT 1
- Redesign
- /server and /servergui bring up no GUI HOT 1
- Same as Issue #14 HOT 1
- GUI items are removed when moved HOT 3
- Feature Request: Compatibility with running other velocity commands HOT 1
- Not Working on Protocolize Update HOT 1
- Alternative to real-time building
- [Request] List of placeholders avaliable to the plugin.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from servergui.