Magic
Server Compatibility
Please make sure you download the correct version for your server:
-
1.9.3 and up => Latest Build
-
1.8.8: => Magic-5.5.6
-
1.8.3: => Magic-5.3.3
-
1.7.x => Magic-CB1.x
-
Earlier: => Check Compatibility in Files Section
Need Help? First Try:
-
Check the FAQ
-
Read the rest of the wiki
-
Check the reference manual for configuration options
-
Check the config info page for spell, wand and other info
-
Find examples in the builtin configs
-
Check your logs for errors
If you can't find what you're looking for, come join us on Discord for help or ideas!
Found a bug? Have a Feature Request?
- Use our issue tracker
Overview
Live Demo
Tutorial Videos
More Information
Please see the Magic home page on github for up-to-date information!
Metrics Collection
This plugin uses bstats for metrics collection. The information sent to bstats.org is completely anonymous, publicly viewable, and includes the following metrics:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true, or by editing this plugin's config.yml and changing "metrics_level" to 0.
Changelog
Full changelog can be viewed on github
There is now an official API for Magic!
In addition, I've made a great effort to clean up the main Spell code in the MagicPlugin codebase itself, if anyone is interested in creating their own custom spells that will integrate right in with Magic.
I've also provided an example of integration with MagicWorlds, which uses the API to create wands for chests, and to cast spells (I use this to make Autonoma spawn naturally on The Other Side in my custom Survival server config).
MagicWorlds also adds a new spell, Purge. It's a neat 30-line-or-so spell that nicely demos how to use the targeting system and return proper results from your onCast method. It's also pretty handy, but for admins-only (similar to mv /purge).
If there are any developers out there interested in hooking into or extending Magic, let me know!
The API should be pretty solid, and I'm hoping to release 3.0-RC1 soon, which will have full support for the API, and also a solidified interface for adding custom spells.
@Spartan071
I don't think I remove the materials from the wand- I'm actually going to change it so it doesn't remove the spells either, it causes way too much weirdness on server setups where different players have different permissions. You just won't be able to cast the spell.
Unfortunately, the restricted material thing is a bit more complex than that. I can add a message when you try to select a material in the wand you can't use- but I can't generally print a message when it skips building, since that is a per-block check. Some brushes, like copy, clone or replicate, may just fail if you're trying to copy a restricted block, but there's no way to message that without a torrent of spam (think of trying to clone a 16x16x16 block of diamonds or something, you don't want to get 4,000 "can't build with that" messages).
Anyway, it shouldn't be a problem if your players can't get the restricted materials to begin with, which should be the case. If you find my enchant list has stuff on it you don't want (wait for the 3.0 RC and look at that since I've pruned it), you'll have to make a custom enchant list. This is all assuming you allow crafting and enchanting of wands of course :)
It seems to be working now, forgot to deop myself. Kinda odd that when a material is disabled and you try to build with it, it still generates the particles, but doesnt place the blocks. A message saying something like "this block cannot be used with spells" would be nice if i was trying to build with a restricted block.
The reason I was confused was because I had edited the spells earlier, and they dissapeared from the wands when the were disabled, so I when trying to disable materials, i simply looked in my wand to see if the individual icon fo what i was trying to disable was still there.
@Spartan071
Well I recently removed some of the "expensive" blocks from the default enchant list- like diamond_block.
But I *think* if a material is on the "restricted" list, Players can't build with it even if it's in their wands- are you finding that's not the case? Keep in mind being OP'd or using an Admin or Wolf wand will bypass the restriction lists.
You have the right idea though- the "restricted" list is meant to keep wands from being able to use the given material at all- including in copy, clone and replicate.
I've also removed the "absorb" spell from the default enchant list.
Basically I am trying to cover your concerns, making it so that a wand may not naturally grow to be able to duplicate or create valuable blocks. I'm hoping to release 3.0-RC1 which will have these changes in it- but unless the "restricted" list is working for you, it's not going to help if your players already have those materials in their wands. I'll try and test this out when I get a chance.
Also, for the life of me, i can't figure out how to disable certain materials from being used in engineering spells, I know that whatever it is, I should put it in the materials.yml file, but when I put in:
restricted: - diamond_block
It still has diamond block as one of the options for building with, which is troublesome for obvious reasons, and it's not just diamond that i want to disable.
@Spartan071
Lol, nor am I! but I've seen the void destroy wands, sometimes the items despawn even if set to indestructible. I've seen lava do it on occasion, too.
However admins can do better :)
Try "/magic list wands"
and "/magic clean" or "/magic clean Spartan071"
Since wands are indestructible normally, I've just been tossing all wands that I used for testing into the void. Does this destroy the wands? Or do they just fall into the void and collect in say, your seat cushions, or the floor of your car? I'm not really a "void expert".
@Silversbane
Thank you for testing that! I'm going to see if I can make Portal work without it, and I also need to test Cushion (which uses it, but will probably be ok without it). I may end up removing Portal for 3.0, but it seems like that physics listener has got to go :(
That's awesome that you're doing reagents- would you be willing to share that config with me for inclusion in the plugin examples when you're finished? I understand it's a moving target, but I'm probably done adding new spells for a little while :)
@NathanWolf
Preliminary results is that is has fixed it. But need a larger timings log to go off before I can say for sure. I will let you know.
PS .. Thank you and sorry have not tested Portal spell and also still have not finished assigning reagents to all current spells.
I love the idea of some mega powerful wand lieing at the bottom of the lava in the nether for only the bravest of adventurers to discover.
@Silversbane
Update: I just submitted 2.9.9.1 as a patch for this. It removes the block physics handler completely.
I'll be curious to know if this helps any performance issues you may have been having, so please let me know if you try it out!
@Silversbane
Hey, what did you use for that timing? I have to admit I haven't used the builtin bukkit timing stuff, but that looks really handy and I now feel shamed for not having done so!
If I'm reading that right, it seems to be consuming a crazy amount of time in the BlockPhysicsEvent? I mean... what is that, 335 million calls??
All I am doing in there is checking a timestamp and canceling the event if the timestamp is recent. This is used to suspend physics temporarily- offhand, I think this is only used in the Portal spell to create a frameless portal without it immediately collapsing.
That said, it looks like what I'm doing is only taking an average of 0.0001 ms per call. I can't get much better than that- but that event handler is apparently called 335 million times, which is insane.
I think given this information, and if you believe this is causing issues (I imagine it could be, but other plugins must also use that event...), I can just remove the portal spell. I'm not sure of any other way to do it, maybe move this into an optional even listener, but that seems like a lot for the sake of one spell.
Anyway, other than that, it looks like chunk load is a bit expensive, which is probably the plugin searching for lost wands. I'm going to make sure that can be turned off completely for 3.0, but it ties into a few different things (like dynmap, Recall, etc) that can all be disabled/enabled independently, so I have to work on that a bit.
EDIT: Oh, and in 2.9.5 the block populator was still built-in, do you have that enabled? That does make chunk generation quite a bit more expensive, though not chunk loading (once generated).
Thanks for pointing this out! I'm going to think on the block physics thing, but unless that's a CB bug of some kind, and it really gets called that much- I'll probably have to just remove Portal. ;(
Wondering why Magic is taking up a lot of resources even when spells are not being used?
Any help would be appreciated.. Thanks
@TempusVulpi
Nope:
Kaboom: https://github.com/elBukkit/MagicPlugin/blob/master/src/main/resources/defaults/spells.defaults.yml#L762
Nuke: https://github.com/elBukkit/MagicPlugin/blob/master/src/main/resources/defaults/spells.defaults.yml#L784
Is KaBoom SUPPOSED to destroy a huge amount more than the nuke
@NathanWolf
THANKS :D Keep up the great work on the addon!!!
@Term21
If you are op'd, by default you have the
and
permissions.... Hmm, I think for the next release I'll change those to just default to false instead of op.
Anyway, remove those perms or de-op yourself :)
@NathanWolf
No all I am doing is opping my friend and I creating a wand in survival and then we noticed that a witch wasn't hurting us when it hit us with a splash potion of poison.
@Term21
Also I don't know if this will effect it I am running a 1.7.4 bukkit server. (sorry new to the forums don't know if there is a edit last msg)
@Term21
Are you doing something silly like all using a Wolf or Admin wand?