Private warps plugin

11 replies  ·  8 participants  ·  🔒 Locked by AncientEagleHelm on Jan 31, 2014

Nov 14, 2011, 05:51 PM#1
As a request, <brag> I developed a private warps plugin for the server. </brag>

Thanks to LifeTimeBLOOD installing it, I am proud to announce the ability of the individual to create a warp for his/her own use. Think of it as having extra homes, except you can name these homes and share them.

Commands:
where <> denotes required paramaters, and [] denotes an optional parameter/switch:

/privwarps warp <warp name> OR /pwarp <warp name>: Teleports the player to a private warp.
/privwarps help : lists all non-admin commands
/privwarps create <warp name> : creates a private warp
/privwarps delete <warp name> : deletes a warp
/privwarps list : lists all the warps that the player has.
/privwarps share <warp name> <player name> : shares a warp with another player
/privwarps unshare <warp name> <player name> : "un-shares" a warp from another player. Use -o if the player is offline.

Admin commands:

/privwarps override list <player> : lists all the warps a player has
/privwarps override getlocation <player> <warp> : gets the coordinates and world name of a warp belonging to a player
/privwarps override delete <player> <warp> : deletes a player's warp
/privwarps setallowedwarps <Player> <number / "default"> : Sets the maximum amount of warps a player can have. Use "default" to set it to the group default as defined in groups.txt.

(I'm not sure how blood has configured the permissions)


Additional information can be found on the plugins bukkit thread, at http://forums.bukkit.org/threads/tp-adp ... 337.42743/

If you need any help, have any requests, or need to report a bug, talk to me ;)
-Puck
Nov 14, 2011, 06:33 PM#2
Note for permissions: As long as you are approved, you can use the full extend of the non-admin commands.
Moderators and up can use the admin commands. :3:
Nov 14, 2011, 07:39 PM#3
Great work (Y).
Nov 15, 2011, 02:31 AM#4
I find it quite useful now that i use it lol
Nov 15, 2011, 07:50 AM#5
First of all, nice! :D
I was looking through your source-code, and surprised that I understood 90% of it. (I can code in java) and discovered that I seriously need to learn how to do java plugins. :D
Where would you suggest I start? :P
Nov 15, 2011, 01:30 PM#6
Nice one Happy!

No offence though, but how come it's not just "/pw command"
It's faster to type :D
Nov 16, 2011, 06:21 AM#7
Thanks, all.
Where would you suggest I start? :P


Assuming you already have a decent understanding of Java, I've found the best way to learn to do a plugin is to start making one yourself. As far as bukkit goes, I have a little collection of resources here.

First, the bukkit wiki tutorial; all the basic setup is here, as well as a step-by-step way of setting up a plugin: http://wiki.bukkit.org/Plugin_Tutorial

For reference, here are the bukkit docs. Just looking through here can teach you a lot, and when you need to find a function to do something, you will find it here. http://jd.bukkit.org/doxygen/index.html

And here is a template of a small, blank project: http://code.google.com/p/blank-bukkit-p ... trunk/src/

Just gradually learn how api's work if you aren't familiar with them already. Get the hang of the bukkit api, and learn the various events and event listeners that exist within it.

Of course you can come to me if you need help, or join the #bukkitdev irc channel on esper.net. Happy coding :D
Nov 17, 2011, 12:00 PM#8
Thanks! :) I'll give it a look.

After giving the bukkit tutorial a very quick look, it actually looks really "easy". :) (Easy to start on at least)

How do you make mods without using the bukkit API?

EDIT: Those guides were awesome. :) 30min in I had already made a plugin that turned everything I hit into Diamond blocks. :3 an hour later I could turn it on/off with a server command, though that only works on a global basis, (turning it on/off for all players), since I didn't wanna bother to start doing hashmaps to figure out who has it on or off. :D
Nov 17, 2011, 10:06 PM#9
This is FTW, although I have one question:

What is the current maximum amount of warps players can have?
Nov 17, 2011, 11:30 PM#10
What is the current maximum amount of warps players can have?

As far as I understand it, there is no maximum.
Nov 18, 2011, 01:58 PM#11
What is the current maximum amount of warps players can have?

As far as I understand it, there is no maximum.


I had a look at the source, the theoretical limit is 2,147,483,647 :P