1

I need some help with coding!

Alex Time 9/4/16 2:22 pm
376
11/26/2016 8:18 pm
So, I just made a magicspells spell ( the noob HelloWorld spell ), but in game it doesn't work!
I do /cast hello ( name o spell ) but doesn't work! (BTW the other spells do work )

Eclipse code:

package my.first.spell;

import org.bukkit.entity.Player;

import com.nisovin.magicspells.spells.InstantSpell;
import com.nisovin.magicspells.util.MagicConfig;

public class HelloWorld extends InstantSpell {

public HelloWorld(MagicConfig config, String spellName) {
super(config, spellName);
}

@Override
public PostCastAction castSpell(Player player, SpellCastState state, float power, String[] args) {
if (state == SpellCastState.NORMAL) {
sendMessage(player, "Hello World!");
}
return PostCastAction.HANDLE_NORMALLY;
}

}

Config adds:

hello:
spell-class: "my.first.spell.HelloWorld"
name: hello
description: Hello, world!

Please help me!
Posted by
Alex Time
Level 1 : New Miner
3

  Have something to say?

JoinSign in

1

jely2002
11/26/2016 8:18 pm
Level 44 : Master Architect
Your Java seems correct (I create plugins myself). That's all I can say because I don't have any experience with the magic spell plugin.

Hoped I helped a little bit
- Jely2002
1

Welcome