question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Can i add class with the api?

See original GitHub issue

I wanna use the MagicApi for create a custom class: CustomClass

Can i do this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
NathanWolfcommented, Feb 22, 2021

Oh, yeah sadly the doxygen docs got broken. I’ll replace with a link to the classes:

https://github.com/elBukkit/MagicPlugin/blob/master/MagicAPI/src/main/java/com/elmakers/mine/bukkit/api/action/SpellAction.java

https://github.com/elBukkit/MagicPlugin/blob/master/Magic/src/main/java/com/elmakers/mine/bukkit/action/BaseSpellAction.java

If using BaseSpellAction (which I would recommend), you will need to build against the Magic plugin itself, not the API. The plugin is not available in the Central Maven repo, so you will have to add the elMakers repo:

    <repositories>
        <repository>
            <id>elMakers</id>
            <url>http://maven.elmakers.com/repository/</url>
        </repository>
    </repositories>

Then you would add Magic as a dependency like this:

    <dependencies>
        <dependency>
            <groupId>com.elmakers.mine.bukkit.plugins</groupId>
            <artifactId>Magic</artifactId>
            <version>8.3</version>
            <scope>provided</scope>
        </dependency>
   </dependencies>
1reaction
NathanWolfcommented, Feb 21, 2021

The wiki is hosted on github… is that really down for you?

Truth be told it’ll be easier to make your own action if you depend on Magic and not the API, so you can inherit from the BaseAction class. If you can do that, just look at any of the actions int the source code, it’s pretty easy. Just implement prepare and process methods.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - How to add a class to a given element?
Add a space plus the name of your new class to the className property of the element. First, put an id on the...
Read more >
.addClass() | jQuery API Documentation
A function returning one or more space-separated class names or an array of class names to be added to the existing class name(s)....
Read more >
Element.classList - Web APIs | MDN
classList is a read-only property that returns a live DOMTokenList collection of the class attributes of the element. This can then be used ......
Read more >
Frequently Asked Questions - Virtual Classroom API - BrainCert
Frequently Asked Questions. Can I use Virtual Classroom API to integrate BrainCert's courses and testing platform in my website?
Read more >
Classes Added Using GenerateSchema Appear in the ...
I need to add explicitly add some additional class definition to swagger.json. These are for classes which do not appear in any web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found