Comments (5)
What exactly are you trying to do and at which point is the sign text not changed? When it's applied to the world or in a plugin function somewhere?
Because the signs are changed by using the setSignLine method in the SignChangeEvent so Bukkit is responsible for actually setting the changed lines on the sign in the end.
from chestshop-3.
I'm trying this code on PreShopCrationEvent..
for (int i = 0; i < 4; i++) {
e.setSignLine((byte) i, "");
}
and it should change the sign's text right?. Btw I'm making a shop limiter addon where it will cancel the event and I want to clear the sign's line when player reached the max limit..
But the problem is.., that code is not working and its not changing the sign's text.
Also I'm not on my pc rn, I'm using my phone to reply, I'll continue this tommorow, thanks
from chestshop-3.
Btw, I hope I've explained it correctly. I'm not really good at english. Thanks..
from chestshop-3.
Yeah I think I see what the issue is. When cancelling the event it will not reach the line setting part. Maybe we should move the sign setting before the return when it's cancelled or cancel the SignChangeEvent too when the PreShopCreationEvent is cancelled. Not sure which the better solution is but the way it's now it's not really practical.
from chestshop-3.
Okay I can use my pc now. Here's my code (not working tho), I've tried to cancel the event after I changed the sign.
if (currShop >= limit) {
player.sendMessage(Main.getPrefix() + "You have reached the max limit of shops creation. Please contact server admin if you need some help.");
for (int i = 0; i < 4; i++) {
e.setSignLine((byte) i, "");
}
e.setSignLine((byte) 0, "[ Error ]");
e.setOutcome(PreShopCreationEvent.CreationOutcome.OTHER);
return;
}
Can you help me?, If you can't well its okay
from chestshop-3.
Related Issues (20)
- InventoryHolder couldBeShopContainer check - Broke double chest quantity updating. HOT 1
- Updating Item Metadata database to data version 3578 - Errors HOT 6
- an internal error occurred while attempting to perform this command HOT 1
- Deserialization error. BlockStateTag, honey_level HOT 1
- Version v3.9.0 HOT 3
- fe maxholding HOT 5
- Item Aliases not showing up HOT 1
- Make chestshop toggle persistent
- [Craft Scheduler Thread - 9/WARN]: [ChestShop] Error while trying to query Jenkins API HOT 3
- Support double for TAX_AMOUNT HOT 4
- Stock counter not updating when container is being filled by hopper HOT 2
- Sign displays the translated name HOT 1
- Decorated Pot cannot be used as a ChestShop (fails on right-click interaction) HOT 1
- Failed to execute goal on project chestshop: Could not resolve dependencies HOT 8
- Sign not working HOT 3
- Problems with some Applied Energistics items HOT 3
- GUI / UI HOT 1
- Updater isssue HOT 10
- Folia 1.20.4 cannot be loaded HOT 4
- Bug HOT 1
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 chestshop-3.