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!
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!
1
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
Hoped I helped a little bit
- Jely2002
