Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename a Portal #616

Open
benwoo1110 opened this issue Mar 4, 2021 · 4 comments
Open

Rename a Portal #616

benwoo1110 opened this issue Mar 4, 2021 · 4 comments

Comments

@benwoo1110
Copy link
Member

benwoo1110 commented Mar 4, 2021

As the title states, add ability to rename an mv-portal.

@caffeineLover
Copy link

This should actually not be very difficult to do at all. If someone forked the codebase, I think this could be done in about an hour.

You can actually probably do it with a text editor, too. For example, suppose you want to change portal TreetopRestStop to OakTreetopRestStop. Load portals.yml into vim, and do something like %s/TreetopRestStop/OakTreetopRestStop/g (basically, a string find and replace). You'll also want to make sure the world is correct too. So, you'd first want to change the portal itself, e.g.

TreetopRestStop:
entryfee:
amount: 0.0
safeteleport: true
teleportnonplayers: false
handlerscript: ''
owner: CaffeineNYC
location: -1110.0,71.0,52.0:-1107.0,73.0,52.0
world: SurvivalWorld
destination: p:WaterfallRestStop

and then you'd want to change all references to that portal, e.g.

test:
entryfee:
amount: 0.0
safeteleport: true
teleportnonplayers: false
handlerscript: ''
owner: CaffeineNYC
location: -774.0,72.0,80.0:-772.0,74.0,80.0
world: SurvivalWorld
destination: p:TreetopRestStop

Like I mentioned, forking the codebase and implementing it would be almost trivial, and I'd recommend it since your idea is a good one, and it appears nobody is willing to implement it.

However, doing it with a text editor seems so trivial, it seems a shame to waste time implementing. Maybe that's why nobody's picked it up?

@benwoo1110
Copy link
Member Author

I will probably get around it eventually, but mv isn't the only project I have. Since you said it's quite easy, why not you open a PR 😛? Always happy to see good contributions.

@caffeineLover
Copy link

caffeineLover commented Jul 21, 2021

I would, but I don't know if you want me touching your code. I'm a C++/python guy who moonlights as a Java dev. LOL.

Edit: Wow! Your code is super clean and a pleasure to learn from. I'm normally used to Bukkit plugins looking like spaghetti run through a blender and squished by a steamroller.

@nicegamer7
Copy link
Member

Doesn't hurt to try.

And lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants