Created
April 14, 2016 21:19
-
-
Save csh/de7970b02642bec839db66a895211ba0 to your computer and use it in GitHub Desktop.
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
<templateSet group="bukkit/scheduler"> | |
<template name="runTask" value="org.bukkit.Bukkit.getScheduler().runTask($PLUGIN$, () -> { $END$ });" description="Executes a task using the given Plugin instance" toReformat="true" toShortenFQNames="true"> | |
<variable name="PLUGIN" expression="variableOfType("org.bukkit.plugin.Plugin")" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_CODE" value="false" /> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> | |
<template name="runTaskAsynchronously" value="org.bukkit.Bukkit.getScheduler().runTaskAsynchronously($PLUGIN$, () -> { $END$ });" description="Executes a task asynchronously using the given Plugin instance" toReformat="true" toShortenFQNames="true"> | |
<variable name="PLUGIN" expression="variableOfType("org.bukkit.plugin.Plugin")" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_CODE" value="false" /> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> | |
<template name="runTaskTimer" value="org.bukkit.Bukkit.getScheduler().runTaskTimer($PLUGIN$, () -> { $END$ }, $PAUSE$, $EVERY$);" description="Executes a task every n ticks using the given Plugin instance" toReformat="true" toShortenFQNames="true"> | |
<variable name="PLUGIN" expression="variableOfType("org.bukkit.plugin.Plugin")" defaultValue="" alwaysStopAt="false" /> | |
<variable name="PAUSE" expression="expectedType()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="EVERY" expression="expectedType()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_CODE" value="false" /> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> | |
<template name="runnable" value="new org.bukkit.scheduler.BukkitRunnable() { @Override public void run() { $END$ } };" description="Create a new BukkitRunnable" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_DECLARATION" value="true" /> | |
<option name="COMPLETION" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
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
<templateSet group="bukkit/utility"> | |
<template name="handler" value="@org.bukkit.event.EventHandler public void handle($TYPE$ event) { $END$ }" description="Generate EventHandler annotated methods" toReformat="true" toShortenFQNames="true"> | |
<variable name="TYPE" expression="variableOfType("org.bukkit.event.Event")" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> | |
<template name="scheduler" value="org.bukkit.Bukkit.getScheduler()" description="Retrieve the BukkitScheduler instance via the Bukkit utility class" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="COMPLETION" value="true" /> | |
</context> | |
</template> | |
<template name="server" value="org.bukkit.Bukkit.getServer()" description="Retrieve the Server instance via the Bukkit utility class" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="COMPLETION" value="true" /> | |
</context> | |
</template> | |
<template name="provider" value="org.bukkit.plugin.java.JavaPlugin.getProvidingPlugin($CURRENT$.class)" description="Retrieve the Plugin instance that provides the given class" toReformat="true" toShortenFQNames="true"> | |
<variable name="CURRENT" expression="className" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="COMPLETION" value="true" /> | |
</context> | |
</template> | |
<template name="service" value="org.bukkit.plugin.RegisteredServiceProvider<$TYPE$> provider = org.bukkit.Bukkit.getServicesManager().getRegistration($TYPE$.class);" description="Retrieve the service provider of a given type" toReformat="true" toShortenFQNames="true"> | |
<variable name="TYPE" expression="variableOfType(Type)" defaultValue="Object" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> | |
<option name="XML_TEXT" value="false" /> | |
<option name="JSON" value="false" /> | |
<option name="JAVA_CODE" value="false" /> | |
<option name="JAVA_STATEMENT" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_DECLARATION" value="true" /> | |
<option name="JAVA_COMMENT" value="false" /> | |
<option name="JAVA_STRING" value="false" /> | |
<option name="COMPLETION" value="false" /> | |
<option name="SQL" value="false" /> | |
<option name="GROOVY" value="false" /> | |
<option name="GROOVY_EXPRESSION" value="false" /> | |
<option name="GROOVY_STATEMENT" value="false" /> | |
<option name="GROOVY_DECLARATION" value="false" /> | |
<option name="MAVEN" value="false" /> | |
<option name="KOTLIN" value="false" /> | |
<option name="KOTLIN_TOPLEVEL" value="false" /> | |
<option name="KOTLIN_STATEMENT" value="false" /> | |
<option name="KOTLIN_CLASS" value="false" /> | |
<option name="KOTLIN_EXPRESSION" value="false" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
<option name="OTHER" value="false" /> | |
</context> | |
</template> | |
<template name="pwp" value="new java.util.ArrayList<Player>(); for (org.bukkit.entity.Player player : org.bukkit.Bukkit.getOnlinePlayers()) { if (player.hasPermission("$PERMISSION$")) { $VAR$.add(player); } }" description="Populate a Collection with players that have a specific permission" toReformat="false" toShortenFQNames="true"> | |
<variable name="PERMISSION" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="VAR" expression="variableOfType("java.util.List")" defaultValue="players" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_CODE" value="false" /> | |
<option name="JAVA_STATEMENT" value="false" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_DECLARATION" value="false" /> | |
<option name="COMPLETION" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
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
<templateSet group="xml"> | |
<template name="spigot" value="<repository> <id>spigot-repo</id> <url>https://hub.spigotmc.org/nexus/content/groups/public</url> </repository>" description="Spigot repository" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="XML_TEXT" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment