Comments (6)
I am unsure if we currently support multiple destinations, though it wouldn't be hard to make it support a list of destinations e.g. portal1,portal2,portal3,portal4
If you are able to code or at least know how to make minimal edits you may be able to sort it before I get a chance to compile it.
I may be able to sort you out a copy that can go to random locations on a list tomorrow, though I have a lot going on.
Essentially the line you would need would be
String[] destinations = portal.getDestiation().split(",");
destination = destinations[random.nextInt(destinations.length)];
and then replace the references to portal.getDestiation()
with destination
from advanced-portals.
Actually, I just did a test compiling it through github, try to give that a try. There is a chance it'll just error though should be fine.
Advanced-Portals-Desti.zip
from advanced-portals.
I launched the plugin on the server, and tried to make a portal that leads to different destinations, as you wrote in the example, but in my case destination:dest1,dest2,dest3 but it says that such a destination does not exist. Have you already implemented this feature with random teleportation or are you just going to implement it?
from advanced-portals.
I'm not a programmer at all so I rewrote the code using chatgpt and got this
} else if (portal.getDestiation() != null) { ConfigAccessor configDesti = new ConfigAccessor(plugin, "destinations.yml"); String[] destinations = portal.getDestiation().split(","); if (destinations.length > 0) { Random random = new Random(); String destination = destinations[random.nextInt(destinations.length)]; if (configDesti.getConfig().getString(destination + ".world") != null) { warped = Destination.warp(player, destination, portal, hasMessage, false); if (!warped) { if(doKnockback) throwPlayerBack(player); } } } } else if (showFailMessage) {
Replaced the necessary lines and compiled and upload on server, and reboot server, but when i run this commsnd /portal create name:portal1test1 triggerblock:WATER destination:dest1,dest2,dest3
it wrote to me destination: dest1,dest2,dest3 (destination does not exist)
from advanced-portals.
While im updating the release mechanism, this should help you :)
Multi desti.zip
from advanced-portals.
Thank you very much, as for me, the function of random teleportation to different destinations is the base
from advanced-portals.
Related Issues (20)
- floodgate/geyser issue HOT 2
- plugin cannot work on paper 1.19.4 HOT 2
- Create prototype modnode system
- velocity-plugin.json missing Author. fix's compatibility with autoplug HOT 2
- [suggestion] folia support HOT 11
- Create optimisation on call for getTileEntities HOT 1
- Commands not working at all HOT 12
- How to move from A portal on server A to A portal on server B HOT 1
- High Velocity Portal Entry - Commands don't issue HOT 4
- Issues with velocity HOT 9
- Player name Placeholder HOT 1
- [BUG] RUT ROH RAGGY what's a RAG HOT 3
- How do I make the transition between servers to Velocity?
- help HOT 2
- Advanced Portals and NappyCraft HOT 4
- How to add permisson to non op players to create portals? HOT 1
- How to turn off join cooldown protection? HOT 2
- Add support for MMO Profiles
- Command doesn't issue on portal creation
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 advanced-portals.