Open keir-nellyer opened 9 years ago
I actually try to make Skript compatible with Java 6 and later, but still use some useful Java 7 features like native file copying. I don't know how to find uses of 1.7 API in my code though so I cannot guarantee that it works in Java 6, but most likely does.
BTW: java.nio.Charset was added in Java 1.4.
First of all I would like to say I am not personally a user of Skript, however a friend of mine had this issue and I was able to figure out why it is happening.
You use Java 7 features for example here: https://github.com/Njol/Skript/blob/master/src/main/java/ch/njol/skript/config/ConfigReader.java#L28 The NIO package is new in Java 7.
However due to your Maven configuration, the MANIFEST included in your plugins says it's compatible with Java 6.
There are 2 ways you could fix this:
A) Remove all references to Java 7 specific features and set this line https://github.com/Njol/Skript/blob/master/pom.xml#L226 to "1.6" which will throw an error when compiling if you attempt to use Java 7 specific features in the project.
B) Set https://github.com/Njol/Skript/blob/master/pom.xml#L226 and https://github.com/Njol/Skript/blob/master/pom.xml#L225 to "1.7" which will throw an error when Bukkit attempts to load the plugin if the user has a lower Java version than 1.7.
I would personally recommend option B.