SkyText
SkyText
Description
Compatible with Bukkit 1.7.2!
SkyText is a plugin to allow you to write text in your world
using the command /skytext hello_world 0 will write hello world in blocks where you are standing. You can use this plugin to write text above your portals or just write text to sign post areas.
In v1.1+ you can now add scheduled text.
For instance, if you have a minigames area you can put text that changes between all your minigames available in the portal beneath. You could also, if other plugins allow, have countdowns to games starting.
Also, in 1.1+, you can now have text that changes based upon command blocks.
Any suggestions then please let me know, this is my first plugin (of many I hope).
Features
- writes text of your choosing
- change the rotation of the text
- Schedule text to display on server start
- Allow changing text in a specific position
Dependencies
- worldedit - I highly recommend getting the latest snapshot, especially if you are running 1.7.2 as this has the latest NMS support (http://builds.enginehub.org/job/worldedit/)
Optional dependencies
- Vault - If you want any integration with economy, ensure you have Vault
- Factions - If you are a factions lover, and want to integrate, ensure you have it installed!
How to install
- download SkyText.jar and place in plugins folder
- download worldedit from here and place in plugins folder
- restart server
- If you change the config, you will need to restart the server to get those changes!
Setup
No setup is required if you do not wish to have text that changes on a schedule or is linked to server start.
Brief Tutorial
Commands
Note: If you wish to have a space in your message, use the _ character
Place a message where the player is standing with a specified rotation and optional coordinates
- /skytext <message> <rotation in degrees (0,90,180 or 270)> [x] [y] [z] [world]
From 1.15 you can also use:
- /skytext <message> <rotation in degrees (0,90,180 or 270)> [blockid] [dataid] [x] [y] [z] [world]
Create a new message group in the config and set a default message
- /skytext create <name_of_message_group> <message>
Add a new message to be rotated in a message group
- /skytext set <name_of_message_group> <message>
Change message group settings (new in 1.12)
- /skytext set <name_of_message_group> set <world|ticks|rotation|blockid|dataid|location> <value>
Reload from config.yml
- /skytext reload
Config.yml
You can see an example config.yml here config.yml
Permissions
- skytext.write gives permission to write
- skytext.create gives permission to create a message group
- skytext.reload gives permission to reload from config.yml
API
A better implemented API is coming shortly, but this code works perfectly fine for now.
Add this to your OnEnable or initialisation code:
SkyText SkyTextPlugin = new SkyText();
Then wherever you wish to write text use this:
Writing.WriteText(new Location(Bukkit.getWorld("world"),100,100,100), "chicken", 0, SkyTextPlugin, 100, 1, 0);
WriteText Parameters:
- Location is the location in the world.
- The letters are what you want to display, in this case I picked "Chicken",
- The angle is the rotation angle, either 0,90,180 or 270
- Then we pass the skytext plugin into the command.
- Then we pass the maxwidth, this is currently unused.
- Finally we pass the blockid and the dataid.
Changelog
- 1.15
- Breaking Change: Updated command to include optional blockid and dataid of block: /skytext <Message> <rotation> [blockid] [dataid] [x] [y] [z] [world_name]
- Added some colours to messages to make them clearer
- Added the following parameters:
- %online% - The number of online players
- %maxplayers% - The maximum amount of players allowed
- %playername% - The name of the player running the command
- %playerlevel% - The level of the player running the command
- %playerlevel:PlayerName% - The level of the specified player
- %playerbalance% - The balance of the player running the command
- %playerbalance:PlayerName% - The level of the specified player
- %playerpower% - The Factions Power for the player running the command
- %playerpower:PlayerName% - The Factions Power for the specified player
- %days:EventName% - Days until EventName happens
- %hours:EventName% - Hours until EventName happens
- %minutes:EventName% - Minutes until EventName happens
- %seconds:EventName% - Seconds until EventName happens
- Fixed compatibility problem with AWE
- Fixed Colon not working
- Area is no longer cleared in advance, rather as each letter is added a space is also added between letters
- 1.14
- Fixed crash when using the plugin when you did not have the magical default world name that I created. (*slaps self*)
- 1.13
- Added reload command. Use /skytext reload to reload config.yml
- Added skytext.reload permission. Use to allow anyone to reload.
- Removed the need for setup:true|false in the config, it will now check if the schematics are present before copying them
- 1.12
- Refactored code to make things a little easier to maintain (Already!?)
- Added setting message_group settings without editing config.yml
- Added more error checking and feedback to the player
- 1.11
- Now correctly clears old word of message group
- Fixed spacing between letters
- Fixed letter I getting skipped (if you upgrade from a previous version, set setup:false in the config.yml to regen the schematics
TODO
- Add Undo
- Add broadcast option to skytext options (when large letters in the sky just aren't enough!)
Bugs
- When using message groups, if one of the lines is longer than the other, the text can overlap. I would recommend using the underscore character to flesh out the text so it gets wiped. For example:
- _hello_world_
- how_are_you
- Improve schematics
Thanks
- Thanks to desht for the TerrainManager code, it saved me some research! :D
Is there a way to use this to make a countdown, and also can you add a few placeholders next time you update it?
Such as {playername} {online} {balance} {total time online} {power} <- factions
So when someone logs in they would be able to see [if it's set to do this] a skytext message that says "Welcome [players ign], you have played a total of {total time online}, you currently have {balance}, there are {online} other players online at the moment. There is {months} {days} {hours} {minutes} {seconds} until [blah blah some event, such as Christmas :D] A {year} placeholder would be cool, but really unnecessary if its holidays.
Lastly, if you could make it rotate through multiple messages, listed in config maybe? Through a certain interval of minutes or seconds?
If you could add these features that would be soo awesome!! Thanks, I'll be adding this soon!
Edit: Also, if you want to see an example of the countdown, and the {playername} place holder, just pm me and I can show you a place :)
@commonblob
i mean when you type "/skytext" it show help but it everything white :P
Too much space at the end of the last word of the message.. for example if you write somemessage_b and there is a wall or something 30 blocks after the last letter, it will be destroyed. fix please. Add a config to set how many blocks will be the space.
Can you make a tutorial pls because i can't make message group ! thk ;)
Soory for my english
@Nikkolo94
White? Not stone? The default schematics should be stone.
I have already added in the next update an added parameter to change the material of the blocks. You can already do this in the preconfigured messages, but not in the /skytext <message> command.
@Nikkolo94
Yes, I have made a plugin, and I made sure the commands and other features worked before I released it. In regards to making this plugin over - I shouldn't have to recode a plugin if one exists already. I was just claiming that the messages that were stated before were actually true as I wanted to see this get fixed. I do agree however, they had posted very weak reports.
ok trying it now!
Edit:
/skytext Hello_World 90 IS WORKING ! no internal error anymore LOL
now you just need fix colors, because everything white is so bad :P
1.14 submitted with fix for the crash lots of you are getting.
Apologies, it was a stupid code error.
@darkness1999
Hey darkness1999. Sure i'll be creating an API after 1.14 (which fixes the big crash problem people are getting) :D
AWESOME PLUGIN!!!
Could you add an API?
@lawrence1998
No. But I have 2 reports it doesn't, and im looking at it.
I run this on 2 of my servers that run Spigot 1.7.2, I also run it on a windows server running craftbukkit latest dev build. It works as expected.
Clearly something is missing on your servers and I am adding further debug code to find out why you are getting the errors. I expect to have a version today with progress. It seems odd that anyone should be experiencing problems on the simplist part of the plugin! This is my first plugin, so its expected I have a learning curve :)
You do realise this dosn't work atall don't you?
@levisn1
ho visto che sei italiano dal comando che hai usato :P
anyway yeah, i have this problem too :(
spigot 1.7.2
http://dev.bukkit.org/bukkit-plugins/skytext/tickets/1-an-internal-error-occured-while-attempting-to-perform/
I'm usng latest spigot dev 1.7.2 and i get this error
@commonblob
:) well i have flow disabled, so with lava/water would be cool! :P also pysich of blocks like sand/gravel is disabled too xD
Just posted v1.13 with reload command! (yay!).
Found it can be quite fun having text made of sand.
Not a good idea doing lava though....
@Nikkolo94
Hi Nikkolo,
Yes this should be possible. For now, I would recommend in your yml do:
I know this isn't perfect, but it should work for now.
is possible to make group of message center?
Hello world !
My name is Nikkolo
v
Hello world !
My name is Nikkolo
<<reply 1891525>>
do you have skype?
@Nikkolo94
Hey Nikkolo94,
The colours do not show, you are correct, ive fixed this for the next version...
Don't use spaces in your messages, use the _ for a space.
/skytext set default blockid is correct. Does the config.yml update correctly? Note that currently you need a server restart to pickup the newer config changes (this is my next task)