#Plugin Help
1 messages · Page 1 of 1 (latest)
Hi, let me explain
I have this event on a listener, and it affects the functionality of my plugin on another listener
I just want to know how can i move the action to another listener, i need to import
like call a method from another class?
Yes
make it public, keep an instance of the class and call it thorugh that
I'd really recommend learning java before starting plugin dev, it helps a lot
public void onBreak(BlockBreakEvent event) {
blockStorage.removeData(event.getBlock().getLocation());
}```
Something like this
Yes thanks you for the recomendation, when i finish this project ill start learning java i started with the wrong foot
whaty method are you trying to use
Im just trying to use this but here
use the entire event handler?
like the onBreak method?
you can't, its an event handler
technically you can but it's icky
don't confuse them
you shouldn't, so it's not important
What exactly are you trying to do? are you trying to break a block?
I have some context as one of the methods is actually my code
That MONITOR listener removes block data from a database when a block is broken
He has another listener that does some checks to prevent random people from breaking those blocks
I store the block, and it save the data on a database