Comments (6)
Actually, you should be able to get region data by using %event-region%, but that is bugging... I could fix it quickly, but I fear that might break other stuff.
from skript.
Very hard to solve, after few hours of debugging yesterday I could not figure out why it doesn't work and gave up... Will try again once I have loots of time.
from skript.
on region enter and on region leave seem to be completely broken now. The only exception to this is teleporting in and out of the regions which works perfectly. %region% and %event-region% also works perfectly when teleporting in and out of regions.
When you walk, the events don't fire at all.
from skript.
I've been having the same issue as Pilv. I actually reported it once here but it randomly fixed itself while the server was still running. It started again a few days ago.
from skript.
I may have found the issue? Keep in mind as I said before, I don't write plugins or know Java specifically, I'm just able to read it alright.
Towards the bottom of EvtRegionBorder.java, there's the code block which appears to actually be calling the region entry and leave events - casts the event to a PlayerMoveEvent, gets the previous and current location, and appropriately calls leave/entiry events respecitvely for regions at those location. In this commit, you changed if (to.equals(from))
to if (to.equals(from) || to.distanceSquared(from) < 2)
, which was eventually separated out and changed to if (to.getWorld().equals(from.getWorld()) && to.distanceSquared(from) < 2)
as a result of this issue report, which is what it is currently.
I think the problem is that adding the to.distanceSquared(from) < 2
makes the event really inconsistent when moving at low speeds, because it just straight up won't fire unless you've moved far enough in that move event. The distance moved shouldn't matter.
I'd recommend removing this chunk of code entirely, reverting it to the old behavior:
if (to.getWorld().equals(from.getWorld()) && to.distanceSquared(from) < 2)
return;
I tested at different speeds, and sprint flying quicker (I did /speed 3) through the region made the events fire much more consistently.
from skript.
I have no idea how, but this is fixed. Maybe some bug fix on Spigot?
from skript.
Related Issues (20)
- ItemType with enchantments expression HOT 3
- Item Builder Section HOT 4
- [SUGGESTION] loop savers HOT 2
- Regions are not Serializable HOT 2
- Add middle click event HOT 7
- %entitytype% may return null HOT 1
- How do I write Hex code in skript!? HOT 1
- An internal error occurred while attempting to perform this command. HOT 3
- Player Teleportation Bug when an entity rides the player HOT 4
- named atribute doesnt work.. HOT 1
- Replace using regex HOT 2
- [SUGGESTION] Functions that return key & value HOT 1
- Set line | doesn't work on: bamboo/cherry sign | and | hanging´s: crimson warped | HOT 1
- Server randomy crashes HOT 5
- NotSerializableException when using "end rod" aliases/visual effect HOT 4
- Multiple Permissions in a command HOT 8
- Extraneous [the] in hotbar slot expression.
- Add dependencies section to skripts HOT 3
- New event "on any event:" HOT 4
- Item Cooldown Event
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 skript.