Topic locked

Private warps plugin

14 Nov 2011, 18:51

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 [-o] <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)
[Edit: All approved players can use the non-admin commands; mods and up have access to admin commands.]

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
Last edited by Puckey on 14 Nov 2011, 19:49, edited 4 times in total.

Re: Private warps plugin

14 Nov 2011, 19:33

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:

Re: Private warps plugin

14 Nov 2011, 20:39

Great work (Y).

Re: Private warps plugin

15 Nov 2011, 03:31

I find it quite useful now that i use it lol

Re: Private warps plugin

15 Nov 2011, 08:50

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

Re: Private warps plugin

15 Nov 2011, 14:30

Nice one Happy!

No offence though, but how come it's not just "/pw command"
It's faster to type :D

Re: Private warps plugin

16 Nov 2011, 07:21

Thanks, all.
ManIAc wrote: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

Re: Private warps plugin

17 Nov 2011, 13:00

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

Re: Private warps plugin

17 Nov 2011, 23:06

This is FTW, although I have one question:

What is the current maximum amount of warps players can have?

Re: Private warps plugin

18 Nov 2011, 00:30

Eion_Kilant_739 wrote:What is the current maximum amount of warps players can have?

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

Re: Private warps plugin

18 Nov 2011, 14:58

HAPPYGOPUCKEY wrote:
Eion_Kilant_739 wrote: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
Topic locked