This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use aliases on the JAR, more changes and the v2.2.16-beta2
- Don't create aliases-english.sk and aliases-german.sk by default, use ones in the JAR to keep updated - Added colored loaded script message based on load times, you can enable with a system property, not tested though - Added a new NonReflectiveAddon interface for speeding up the getFile method. Only a very very small enhancement. - Added assertions for closeOnEnable and disable, also fixed the version error and added load times of aliases, language files etc. in debug verbosity. Signed-off-by: Mustafa ÖNCEL <[email protected]>
- Loading branch information
Mustafa ÖNCEL
committed
May 30, 2019
1 parent
53d9557
commit 27c474d
Showing
9 changed files
with
289 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* | ||
* This file is part of Skript. | ||
* | ||
* Skript is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Skript is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Skript. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* | ||
* Copyright 2011-2019 Peter Güttinger and contributors | ||
* | ||
*/ | ||
|
||
package ch.njol.skript; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* Represents a non-reflective {@link SkriptAddon}. | ||
* <p> | ||
* Add-ons implementing this interface has | ||
* public get file method. So Skript does not | ||
* use reflection to call the get file method. | ||
* <p> | ||
* The result of the get file method is cached anyway, | ||
* but this can speed up the first call. | ||
* <p> | ||
* The binary compatibility of this interface is | ||
* not guaranteed, and it does not exist in other skript forks. | ||
* <p> | ||
* I made it specially for my add-ons and the vanilla Skript, | ||
* so implementing this in a global add-on is probably a bad idea. | ||
* | ||
* @since 2.2.16 | ||
*/ | ||
public interface NonReflectiveAddon { | ||
/** | ||
* This method is originally protected in Bukkit's {@link org.bukkit.plugin.java.JavaPlugin} class, | ||
* But plugins implementing this interface has public get file methods. | ||
* | ||
* @return The plugin's JAR file if this is a plugin. You should check if it is a plugin before doing so, | ||
* because everyone can implement this interface. | ||
* @since 2.2.16 | ||
*/ | ||
/*public */File getFile(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.