Comments (7)
Thanks for letting me know. I will try to consider this in the next update :)
from basicquests.
This turned out much trickier than expected.
I was not yet able to change this unfortunately :(
Will have a look at it again in the future.
This is the relevant part in the code. I'm open for any suggestions on how to detect the amount of trades that happened when a MOVE_TO_OTHER_INVENTORY
action (shift-click) happened.
from basicquests.
This turned out much trickier than expected. I was not yet able to change this unfortunately :(
Will have a look at it again in the future. This is the relevant part in the code. I'm open for any suggestions on how to detect the amount of trades that happened when a
MOVE_TO_OTHER_INVENTORY
action (shift-click) happened.
Would it not be possible to search for the trader hook itself and count from there?
If the user sells an item, Once sold, it counts. If the user uses shift and sell, it will still be counting in the end as your looking at the sold hook of the trader and not at what the user has in his inventory.
Just wild thinking here. I'm new in the Minecraft world, but I do have a bit of coding knowledge.
from basicquests.
Thanks for your comment @GamingHQ !
Sounds interesting. I'm not entirely sure what you mean by trader hook.
Do you maybe have a documentation reference for me?
from basicquests.
i'm afraid i dont have such documentation. The thing is when it comes on hooks, we use them for modding on rust for example. Hooks like "canentitytakedamage" or "OnGrowableGather" ( see Rust oxide API here of what I'm mentioning https://umod.org/documentation/games/rust#ongrowablegather )
i bet that there is a way to define the hook that we need to use for it. Something like "OnItemSold" is something to look after if there would be a such way of modding. I mean, all i have used is a few bukkit plugins and that's about it. I do have heard that modding on Minecraft can be a bit tricky, so if my thoughts are fully non-valid as it's impossible to mod or code that way in Minecraft, my apologies ofc!
from basicquests.
i actually just found something to look deeper into. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/WanderingTrader.html
You could listen to this hook and determine if an item would be sold.
from basicquests.
Related Issues (13)
- Issue enabling plugin HOT 1
- how to disable villagers quests HOT 1
- Color/message formatting HOT 1
- Block Mining Quest does not progress. HOT 2
- Log spam HOT 4
- Placeholder & Feature Request HOT 1
- Update request HOT 2
- Not a issue HOT 2
- [0.3] Server thread freezes while waiting for chunk structure HOT 6
- Beetroot quest doesn't work HOT 5
- Translation to spanish HOT 21
- deleted
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 basicquests.