当前位置: 首页>>代码示例>>Java>>正文


Java ExpressionType类代码示例

本文整理汇总了Java中ch.njol.skript.lang.ExpressionType的典型用法代码示例。如果您正苦于以下问题:Java ExpressionType类的具体用法?Java ExpressionType怎么用?Java ExpressionType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExpressionType类属于ch.njol.skript.lang包,在下文中一共展示了ExpressionType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerSlimefun

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void registerSlimefun() {
	Skript.registerEvent("On slimefun research", SimpleEvent.class, ResearchUnlockEvent.class,
			"[(slimefun|sf)] research [unlock]");
	EventValues.registerEventValue(ResearchUnlockEvent.class, Player.class,
			new Getter<Player, ResearchUnlockEvent>() {
				@Override
				@Nullable
				public Player get(ResearchUnlockEvent e) {
					Player p = e.getPlayer();
					return p;
				}
			}, 0);
	Skript.registerExpression(ExprSlimefunEvtResearch.class, String.class, ExpressionType.SIMPLE, "event-research");

	Skript.registerEffect(EffSlimefunUnlockResearch.class,
			"[sharpsk] [(slimefun|sf)] unlock research %string% for %player%");
	Skript.registerExpression(ExprSlimefunAllResearches.class, String.class, ExpressionType.SIMPLE,
			"[sharpsk] [(slimefun|sf)] all [(of|the)] researches");
}
 
开发者ID:Sharpjaws,项目名称:SharpSK,代码行数:20,代码来源:SlimefunRegistry.java

示例2: loadBorderEvent

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
private static void loadBorderEvent() {
    Bukkit.getWorlds().forEach(WorldBorderMundo::replaceBorderForWorld);
    Bukkit.getServer().getPluginManager().registerEvents(new Listener() {
        @EventHandler
        public void onWorldLoad(WorldLoadEvent event) {
            replaceBorderForWorld(event.getWorld());
        }
    }, Mundo.INSTANCE);

    Registration.registerEvent("Border Stabilize", EvtBorderStabilize.class, BorderStabilizeEvent.class, "border stabilize [in %-worlds%]")
            .document("Border Stabilize", "1.4.6", "Called when a border (optionally only of the specified world(s)) stops moving.");
    Registration.registerExpression(ExprBorderMovingValue.class, Number.class, ExpressionType.PROPERTY,
            "(0¦original " + DIAMETER_SYNTAX + "|1¦(eventual|final) " + DIAMETER_SYNTAX + "|2¦remaining distance until [the] border stabilize[s]) of %world%",
            "%world%'s (0¦original " + DIAMETER_SYNTAX + "|1¦(eventual|final) " + DIAMETER_SYNTAX + "|2¦remaining distance until [the] border stabilize[s])")
            .document("Moving Border Diameter", "1.8", "An expression for a certain property of the moving border of the specified world:"
                    + "original diameter: The diameter of the border when it was last stable"
                    + "final diameter: The diameter that the border will be when it stabilizes"
                    + "remaining distance: The distance the border still has to go before it stabilizes");
    Registration.registerExpression(ExprTimeRemainingUntilBorderStabilize.class, Timespan.class, ExpressionType.PROPERTY,
            "(time remaining|remaining time) until [the] border stabilize[s] (of|in) %world%",
            "%world%'s (time remaining|remaining time) until [the] border stabilize[s]")
            .document("Time Remaining Until Border Stabilize", "1.4.6", "An expression for the timespan remaining until the border of the specified world stops moving.");
    Registration.registerExpressionCondition(CondBorderMoving.class, ExpressionType.PROPERTY, "border of %world% is (0¦moving|1¦stable)", "%world%'s border is (0¦moving|1¦stable)")
            .document("Border is Moving", "1.8", "Checks whether the border of the specified world is moving or stable (not moving).");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:26,代码来源:WorldBorderMundo.java

示例3: load

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void load() {
    Registration.registerType(CodeBlock.class, "codeblock")
            .document("Code Block", "1.7", "A block of code that can be run to perform certain effects.");
    Registration.registerScope(ScopeSaveCodeBlock.class, "codeblock %object% [with (1¦constant|2¦constant %-object%|3¦constants %-objects%)] [:: %-strings%] [-> %-string%]")
            .document("Code Block Declaration", "1.7", "Puts a codeblock with the code under the scope in the specified variable (the first specified expression). "
                    + "Codeblocks have three special features:"
                    , "Constants - constants are variables which are shared between different executions of the same codeblock. "
                    + "Contants are specified using either the second or third specified expression, and can be accessed from within the codeblock using {_constant} or {_constant::*}. "
                    + "This can be used to make player specific codeblocks, world specific codeblocks, etc. "
                    , "Arguments - the syntax for codeblocks allows you to specify argument names (the fourth specified expression). "
                    + "When you do something like 'execute codeblock {_temp} with 1, 2, 3' instead of setting the variables {_1}, {_2}, and {_3}, it will set the variables using the specified argument names. "
                    , "Return values - This allows you to have your codeblocks return values. Currently, returned values cannot be gotten in Skript, instead they are right now only used in Java. "
                    + "In the future you will be able to access return values.");
    Registration.registerEffect(EffRunCodeBlock.class, "((run|execute) codeblock|codeblock (run|execute)) %codeblocks% [(2¦with %-objects%|3¦with variables %-objects%|4¦in a chain|5¦here|7¦with variables %-objects% in a chain)]")
            .document("Run Code Block", "1.7", "Runs the code of the specified codeblocks. "
                    + "By default the codeblocks are run without setting any temp variables. By specifying 'here', you can run them as if they were a part of the code that executed it. "
                    + "By specifying 'variables', you can specify a list variable whose index-value pairs will be used to set temporary variables for the code to be run. "
                    + "Specifying 'in a chain' when multiple codeblocks are specified means that rather than run each codeblock independently, the local variables from each run carries on to the next codeblock. "
                    + "Note that you can't write 'in a chain' with 'here' as 'here' does what 'in a chain' would do by definition.");
    Registration.registerExpression(ExprFunctionCodeBlock.class, CodeBlock.class, ExpressionType.PROPERTY, "[codeblock of] function %string%")
            .document("Code Block of Function", "1.7", "An expression for the codeblock form of the specified function.");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:23,代码来源:CodeBlockMundo.java

示例4: loadHanging

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
private static void loadHanging() {
    Registration.registerEnum(HangingBreakEvent.RemoveCause.class, "hangingremovecause", HangingBreakEvent.RemoveCause.values())
            .document("HangingRemoveCause", "1.8", "A cause for a hanged entity to have been unhung.");
    Registration.registerEvent("Hang Event", SimpleEvent.class, HangingPlaceEvent.class, "hang")
            .document("Hang", "1.6.4", "Called when an entity is hung. Can be cancelled. Also see the Hanged Entity expression.")
            .eventValue(Entity.class, "1.6.4", "The entity that hung the hanged entity.")
            .eventValue(Player.class, "1.6.4", "The player that hung the hanged entity (same as event-entity).")
            .eventValue(Block.class, "1.6.4", "The block on which the hanged entity was hung.");
    Registration.registerEventValue(HangingPlaceEvent.class, Block.class, HangingPlaceEvent::getBlock);
    Registration.registerEvent("Unhang Event", EvtUnhang.class, HangingBreakEvent.class, "unhang [due to %-hangingremovecauses%]")
            .document("Unhang", "1.8", "Called when an entity is unhung. Can be cancelled. "
                    + "Optionally, you can specify hanging remove causes which make the trigger only be called if the unhanging is due to those reasons. "
                    + "Also see the Hanged Entity expression.")
            .eventValue(Entity.class, "1.8", "The entity that unhung the hanged entity.");
    Registration.registerEventValue(HangingBreakByEntityEvent.class, Entity.class, HangingBreakByEntityEvent::getRemover);
    Registration.registerEventValue(HangingBreakEvent.class, HangingBreakEvent.RemoveCause.class, HangingBreakEvent::getCause);
    Registration.registerExpression(ExprHangedEntity.class,Entity.class, ExpressionType.SIMPLE,"hanged entity")
            .document("Hanged Entity", "1.6.5", "An expression, used in the Hang and Unhang events, for the entity which was hung/unhung.");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:20,代码来源:MiscMundo.java

示例5: loadWorldLoader

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
private static void loadWorldLoader() {
    Registration.registerEffect(EffLoadWorldAutomatically.class, "[(1¦don't|1¦do not)] load %world% automatically")
            .document("Load World Automatically", "1.8", "Tells MundoSK whether it should load the specified world automatically on server start. "
                    + "This is useful for simple and straightforward world management without the need for a world management plugin. "
                    + "Don't run this effect with the main world, as Bukkit will already load that world automatically, and this effect can't be used to enable/disable that behavior.");
    Registration.registerExpression(ExprAllAutomaticCreators.class, WorldCreatorData.class, ExpressionType.SIMPLE, "[all] automatic creators")
            .document("All Automatic Creators", "1.8", "An expression for all of the world creators that MundoSK is currently set to automatically run on server start.")
            .changer(Changer.ChangeMode.ADD, WorldCreatorData.class, "1.8", "Specifies that given creator should be used as an automatic creator.")
            .changer(Changer.ChangeMode.REMOVE, WorldCreatorData.class, "1.8", "Specifies that the world with the worldname of the given creator should not be loaded automatically.")
            .changer(Changer.ChangeMode.REMOVE, String.class, "1.8", "Specifies that the world with the given worldname should not be loaded automatically")
            .changer(Changer.ChangeMode.DELETE, "1.8", "Specifies that no worlds should be loaded automatically.");
    Registration.registerPropertyExpression(ExprAutomaticCreator.class, WorldCreatorData.class, "string", "automatic creator %", "automatic creator for world %", "automatic creator for world named %")
            .document("Automatic Creator", "1.8", "An expression for the automatic creator (if there is one) that MundoSK is currently set to run for the world with the specified name.")
            .changer(Changer.ChangeMode.SET, WorldCreatorData.class, "1.8", "Specifies an automatic creator for the specified world.")
            .changer(Changer.ChangeMode.DELETE, "1.8", "Specifies that the specified world should not be loaded automatically.");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:17,代码来源:WorldManagementMundo.java

示例6: load

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void load() {
    Registration.registerEnum(Achievement.class, "achievement", Achievement.values())
            .document("Achievement", "1.4.10", "An achievement that a player can get. "
                    + "Note that achievements were removed in Minecraft 1.12 and thus this syntax will not work if you are running Bukkit/Spigot 1.12 and above.");
    Registration.registerEffect(EffAwardAch.class, "award achieve[ment] %achievement% to %player%")
            .document("Award Achievement", "1.4.10", "Awards the specified achievement to the specified player. "
                    + "Note that achievements were removed in Minecraft 1.12 and thus this syntax will not work if you are running Bukkit/Spigot 1.12 and above.");
    Registration.registerEffect(EffRemoveAch.class, "remove achieve[ment] %achievement% from %player%")
            .document("Remove Achievement", "1.4.10", "Removes the specified achievement from the specified player. "
                    + "Note that achievements were removed in Minecraft 1.12 and thus this syntax will not work if you are running Bukkit/Spigot 1.12 and above.");
    Registration.registerEvent("Achievement Award", EvtAchAward.class, PlayerAchievementAwardedEvent.class, "achieve[ment] [%-achievement%] award", "award of achieve[ment] [%-achievement%]")
            .document("Achievement Award", "1.4.10", "Called when a player is awarded either the specified achievement or any achievement. "
                    + "Note that achievements were removed in Minecraft 1.12 and thus this syntax will not work if you are running Bukkit/Spigot 1.12 and above.")
            .eventValue(Achievement.class, "1.4.10", "The achievement that was awarded.");
    Registration.registerEventValue(PlayerAchievementAwardedEvent.class, Achievement.class, PlayerAchievementAwardedEvent::getAchievement);
    Registration.registerExpression(ExprParentAch.class,Achievement.class, ExpressionType.PROPERTY,"parent of achieve[ment] %achievement%")
            .document("Parent of Achievement", "1.4.10", "An expression for the parent achievement of the specified achievement. "
                    + "Note that achievements were removed in Minecraft 1.12 and thus this syntax will not work if you are running Bukkit/Spigot 1.12 and above.");
    Registration.registerExpression(ExprAllAch.class,Achievement.class,ExpressionType.PROPERTY,"achieve[ment]s of %player%", "%player%'s achieve[ment]s")
            .document("Achievements of Player", "1.4.10", "An expression for a list of the achievements that the specified player has.");
    Registration.registerExpressionCondition(CondHasAch.class,ExpressionType.PROPERTY,"%player% has achieve[ment] %achievement%")
            .document("Player has Achievement", "1.4.10", "Checks whether the specified player has the specified achievement.");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:24,代码来源:AchievementMundo.java

示例7: loadSimple

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
private static void loadSimple() {
    Registration.registerEffect(com.pie.tlatoani.Tablist.Simple.EffCreateNewTab.class,
            "create ([simple] tab [with] id|simple tab) %string% for %players% with [display] name %string% [(ping|latency) %-number%] [(head|icon|skull) %-skin%] [score %-number%]")
            .document("Create Simple Tab", "1.8", "Creates a simple tab for the specified player(s) with the specified id and properties. "
                    + "If a specified player already has a simple tab with the specified id in their tablist, that tab will not be modified and no new tab will be created. "
                    + "This effect will not work for a specified player if they have the array tablist enabled.");
    Registration.registerEffect(com.pie.tlatoani.Tablist.Simple.EffDeleteTab.class, "delete ([simple] tab [with] id|simple tab) %string% for %players%")
            .document("Delete Simple Tab", "1.8", "Removes the simple tab with the specified id from the tablist(s) of the specified player(s).");
    Registration.registerEffect(com.pie.tlatoani.Tablist.Simple.EffRemoveAllIDTabs.class, "delete all (id|simple) tabs for %players%")
            .document("Delete All Simple Tabs", "1.8", "Removes all simple tabs from the tablist(s) of the specified players(s).");
    Registration.registerExpression(com.pie.tlatoani.Tablist.Simple.ExprDisplayNameOfTab.class, String.class, ExpressionType.PROPERTY, "[display] name of ([simple] tab [with] id|simple tab) %string% for %players%")
            .document("Display Name of Simple Tab", "1.8", "An expression for the display name of the simple tab with the specified id in the tablist(s) of the specified player(s).");
    Registration.registerExpression(com.pie.tlatoani.Tablist.Simple.ExprLatencyOfTab.class, Number.class, ExpressionType.PROPERTY, "(latency|ping) of ([simple] tab [with] id|simple tab) %string% for %players%")
            .document("Latency of Simple Tab", "1.8", "An expression for the amount of latency bars of the simple tab with the specified id in the tablist(s) of the specified player(s). This is always between 0 and 5.");
    Registration.registerExpression(ExprIconOfTab.class, Skin.class, ExpressionType.PROPERTY, "(head|icon|skull) of ([simple] tab [with] id|simple tab) %string% for %players%")
            .document("Icon of Simple Tab", "1.8", "An expression for the icon of the simple tab with the specified id in the tablist(s) of the specified player(s).");
    Registration.registerExpression(com.pie.tlatoani.Tablist.Simple.ExprScoreOfTab.class, Number.class, ExpressionType.PROPERTY, "score of ([simple] tab [with] id|simple tab) %string% for %players%")
            .document("Score of Simple Tab", "1.8", "An expression for the score of the simple tab with the specified id in the tablist(s) of the specified player(s).");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:20,代码来源:TablistManager.java

示例8: registerLuckPerms

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void registerLuckPerms() {

		// Effects
		Skript.registerEffect(EffLuckPermsSetPerm.class,
				"[sharpsk] (luckperms|lp) set (-1�transient perm[ission]|1�perm[ission]) %string% to %boolean% for [player] %offlineplayer%");
		Skript.registerEffect(EffLuckPermsUnsetPerm.class,
				"[sharpsk] (luckperms|lp) unset (-1�transient perm[ission]|1�perm[ission]) %string% for [player] %offlineplayer%");
		Skript.registerEffect(EffLuckPermsCreateGroup.class,
				"[sharpsk] (luckperms|lp) create group %string% [with permissions %-strings%]");
		Skript.registerEffect(EffLuckPermsDeleteGroup.class, "[sharpsk] (luckperms|lp) (delete|remove) group %string%");

		// Expressions
		Skript.registerExpression(ExprLuckPermsAllPermissionsOfPlayer.class, String.class, ExpressionType.SIMPLE,
				"[sharpsk] (luckperms|lp) [(all|the)] (-1�transient perm[ission]s|1�perm[ission]s) of %player%");
		Skript.registerExpression(ExprLuckPermsAllGroups.class, String.class, ExpressionType.SIMPLE,
				"[sharpsk] (luckperms|lp) [(all|the)] groups");
		Skript.registerExpression(ExprLuckPermsAllGroupsOfPlayer.class, String.class, ExpressionType.SIMPLE,
				"[sharpsk] (luckperms|lp) [(all|the)] groups of %player%");
	}
 
开发者ID:Sharpjaws,项目名称:SharpSK,代码行数:20,代码来源:LuckPermsRegistry.java

示例9: registerPermissionsEx

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void registerPermissionsEx() {
	Skript.registerEffect(EffRemovePexPerm.class,
			"pex (remove|delete) perm[ission] %string% from %offlineplayers%");
	Skript.registerEffect(EffGiveTimedPexPerm.class,
			"pex add timed perm[ission] %string% to %offlineplayers% (duration|for) %timespan%");
	Skript.registerEffect(EffAddPexPerm.class, "pex add perm[ission] %string% to %offlineplayers%");
	Skript.registerEffect(EffPexAddgroup.class, "pex add group %string% to %offlineplayers%");
	Skript.registerEffect(EffPexRemoveGroupFromPlayer.class,
			"pex (remove|delete) group %string% from %offlineplayers%");
	Skript.registerEffect(EffPexAddPermGroup.class, "pex add perm[ission] %string% to group %string%");
	Skript.registerEffect(EffPexRemovePermGroup.class,
			"pex (remove|delete) perm[ission] %string% from group %string%");
	Skript.registerEffect(EffPexAddAGroup.class,
			"pex create group %string% default %boolean% [with prefix %-string% [and]] [with suffix %-string%]");
	Skript.registerEffect(EffRemoveAGroup.class, "pex (remove|delete) group %string%");
	Skript.registerEffect(EffPexRenameGroup.class, "pex rename group %string% to %string%");
	Skript.registerExpression(ExprPexGroupRank.class, Number.class, ExpressionType.SIMPLE,
			"rank of [the] group %string%");
	Skript.registerExpression(ExprPexGroupOf.class, String.class, ExpressionType.COMBINED,
			"[pex] groups of %offlineplayer%");

	Skript.registerExpression(ExprPexGroupRankLadder.class, String.class, ExpressionType.SIMPLE,
			"rank[]ladder of [the] group %string%");
}
 
开发者ID:Sharpjaws,项目名称:SharpSK,代码行数:25,代码来源:PermissionsExRegistry.java

示例10: url

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
static void url() {
  Skript.registerExpression(ExprUrlContents.class, String.class, ExpressionType.PROPERTY, "[skutil[ities] ]contents from url %string%", "[skutil[ities] ]url %string%'s contents");
  Skript.registerExpression(ExprUrlReadLine.class, String.class, ExpressionType.PROPERTY, "[skutil[ities] ]line %number% from url %string%", "[skutil[ities] ]url %string%'s line %number%");
  Skript.registerExpression(ExprUrlLines.class, Number.class, ExpressionType.PROPERTY, "[skutil[ities] ]line count of url %string%", "[skutil[ities] ]url %string%'s line count");
  Skript.registerExpression(ExprUrlSize.class, String.class, ExpressionType.PROPERTY, "[skutil[ities] ]size of url %string%", "[skutil[ities] ]url %string%'s size");
  Skript.registerExpression(ExprUrlSizeBytes.class, Number.class, ExpressionType.PROPERTY, "[skutil[ities] ]size of url %string% in bytes", "[skutil[ities] ]url %string%'s size in bytes");
  Skript.registerExpression(ExprUrlResponseCode.class, Integer.class, ExpressionType.PROPERTY, "[skutil[ities] ]response code of url %string%", "[skutil[ities] ]url %string%'s response code");
  Skript.registerExpression(ExprUrlOnlineState.class, Boolean.class, ExpressionType.PROPERTY, "[skutil[ities] ]online stat(us|e) of url %string%", "[skutil[ities] ]url %string%'s online stat(us|e)");
  Skript.registerExpression(ExprUrlLastModified.class, Number.class, ExpressionType.PROPERTY, "[skutil[ities] ]last modified value of url %string%", "[skutil[ities] ]url %string%'s last modified value");

  Skript.registerExpression(ExprUrlSSLVerifier.class, String.class, ExpressionType.PROPERTY, "[skutil[ities] ]ssl verifier of url %string%", "[skutil[ities] ]url %string%'s ssl verifier");
  Skript.registerExpression(ExprUrlSSLSerialNumber.class, String.class, ExpressionType.PROPERTY, "[skutil[ities] ]ssl serial number of url %string%", "[skutil[ities] ]url %string%'s ssl serial number");
  Skript.registerExpression(ExprUrlSSLIssueExpire.class, Number.class, ExpressionType.PROPERTY, "[skutil[ities] ]ssl (0¦issue|1¦expire) value of url %string%", "[skutil[ities] ]url %string%'s ssl (0¦issue|1¦expire) value");
  Skript.registerExpression(ExprUrlSSLAlgorithm.class, String.class, ExpressionType.PROPERTY, "[skutil[ities] ]ssl algorithm of url %string%", "[skutil[ities] ]url %string%'s ssl algorithm");
  Skript.registerExpression(ExprUrlSSLVersion.class, Number.class, ExpressionType.PROPERTY, "[skutil[ities] ]ssl version of url %string%", "[skutil[ities] ]url %string%'s ssl version");
}
 
开发者ID:tim740,项目名称:skUtilities,代码行数:17,代码来源:Reg.java

示例11: onEnable

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public void onEnable(){
	Skript.registerAddon(this);
	//
	
	Skript.registerExpression(ExprToRad.class, Number.class, ExpressionType.PROPERTY, "%number% [in] rad[ian]");
	Skript.registerExpression(ExprToDeg.class, Number.class, ExpressionType.PROPERTY, "%number% [in] deg[ree]");
	Skript.registerExpression(ExprMidpoint.class, Location.class, ExpressionType.PROPERTY, "midpoint of %locations%");
	Skript.registerExpression(ExprLineLoc.class, Location.class, ExpressionType.SIMPLE, "linear coord[inate][s] %number% from %locations% to %location%");
	Skript.registerExpression(ExprLine.class, Location.class, ExpressionType.SIMPLE, "line[s] from %locations% to %location%[ with] density %number%");
	Skript.registerExpression(ExprLinkAll.class, Location.class, ExpressionType.SIMPLE, "[all ]%locations% (linked|connected)[ with] density %number%");
	Skript.registerExpression(ExprPolygon.class, Location.class, ExpressionType.SIMPLE, "polygon[s] at %locations% with %integer% (vertex|vertices|vertexes)(,| and) radius %number%");
	Skript.registerExpression(ExprPolygonOutline.class, Location.class, ExpressionType.SIMPLE, "polygon[s] outline[s] at %locations% with %integer% (vertex|vertices|vertexes)(,| and) radius %number%(,| and) density %number%");
	Skript.registerExpression(ExprCube.class, Location.class, ExpressionType.SIMPLE, "cube[s] at %locations%[ with] radius %number%");
	Skript.registerExpression(ExprCubeOutline.class, Location.class, ExpressionType.SIMPLE, "cube[s] outline[s] at %locations%[ with] radius %number%[ and] density %number%");
	Skript.registerExpression(ExprCylinderLoc.class, Location.class, ExpressionType.SIMPLE, "cylinder coord[inate][s][ at] %locations%[ with] coordinates %number%(,| and) %number%(,| and) %number%");
	Skript.registerExpression(ExprHelix.class, Location.class, ExpressionType.SIMPLE, "heli(x|xes|ces) at %locations% with radius %number%(,| and) height %number%(,| and) step (height|size) %number%(,| and) density %number%");
	Skript.registerExpression(ExprCircle.class, Location.class, ExpressionType.SIMPLE, "circle[s] at %locations%[ with] radius %number%(,| and) density %number%");
	Skript.registerExpression(ExprSphereLoc.class, Location.class, ExpressionType.SIMPLE, "spheric[al][ coord[inate][s][ at] %locations%[ with] coordinates %number%(,| and) %number%(,| and) %number%");
	Skript.registerExpression(ExprSphere.class, Location.class, ExpressionType.SIMPLE, "sphere[s] at %locations%[ with] radius %number%(,| and) density %number%");
	Skript.registerExpression(ExprSphereRand.class, Location.class, ExpressionType.SIMPLE, "random sphere[s] at %locations% with radius %number%(,| and) density %number%");
	Skript.registerExpression(ExprRotate.class, Location.class, ExpressionType.SIMPLE, "%locations% rotated around %location%[ in] direction %number%, %number%, %number%(,| with) angle %number%");
	Skript.registerExpression(ExprRotXYZ.class, Location.class, ExpressionType.SIMPLE, "%locations% rotated around (1¦x|2¦y|3¦z)(-| )axis[ at] %location%(,| with) angle %number%");
	Skript.registerExpression(ExprReflection.class, Location.class, ExpressionType.SIMPLE, "%locations% mirrored at %location%[ (in|with) direction %number%, %number%, %number%]");
	Skript.registerExpression(ExprScale.class, Location.class, ExpressionType.SIMPLE, "%locations% scaled[ with] center %location% by %number%[[ and] direction %number%, %number%, %number%]");
	Skript.registerExpression(ExprMove.class, Location.class, ExpressionType.SIMPLE, "(move|shift) %locations%[ with] center %location% to %location%"); 
}
 
开发者ID:bi0qaw,项目名称:Biosphere,代码行数:27,代码来源:Main.java

示例12: onEnable

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
@Override
public void onEnable() {
    if (skriptExists()) {
        Skript.registerAddon(this);
        Skript.registerExpression(ExprModulus.class, Number.class, ExpressionType.PROPERTY, "[skmath] %number% mod %number%");

        logMessage("&c[&6" + getDescription().getName() + "&c] &bPlugin enabled.");
    } else {
        logMessage("&c[&6" + getDescription().getName() + "&c] &eYou must have Skript for this addon working.");
        setEnabled(false);
    }
}
 
开发者ID:ResultLuna,项目名称:skMath,代码行数:13,代码来源:SkMathPlugin.java

示例13: registerExpression

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public void registerExpression(Class<? extends Expression> expression, ExpressionType expressionType) {
    if (!expression.isAnnotationPresent(Documentation.class)) {
        throw new RegistrationException("Expression class: " + expression.getCanonicalName()
                + " does not have a Documentation annotation");
    }
    Documentation documentation = expression.getDeclaredAnnotation(Documentation.class);
    Skript.registerExpression(expression, getGenericType(expression, 0),
            expressionType, addAddonPrefix(documentation.syntax()));
}
 
开发者ID:TonyMaster21,项目名称:BungeeMaster,代码行数:10,代码来源:BungeeMaster.java

示例14: load

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void load() {
    Registration.registerEffect(EffCallCustomEvent.class, "(0¦call|1¦async call|1¦call async) custom event %strings% [to] [det[ail]s %-objects%] [arg[ument]s %-objects%]")
            .document("Call Custom Event", "1.6.7", "Calls a custom event with the specified id and optionally the specified details and/or arguments. "
                    + "Details are used in events as event-type. For example, if you had a detail 3426, event-number would equal 3426. "
                    + "Details may be of any type that is in Skript by default (number, string, player, world, etc.) as well as of any type added in MundoSK (creator, achievement, difficulty, etc.), and possibly other addons, depending on what loads in what order. "
                    + "You can't have two or more details of the same type. If you try to do this, only the detail that comes last of that type will be used. "
                    + "Arguments are like details, except that you may have multiple arguments of the same type, and they can be of any type from any addon. "
                    + "Arguments are accessed from within the event using the Args of Custom Event expression. "
                    + "For both details and arguments, you have to put them in a list variable and then call the custom event using the list variable in the syntax, otherwise you'll get an internal error. "
                    + "In MundoSK 1.8, two new features have been introduced (these will not work in previous versions):"
                    + "First, you can specify that the custom event is being called asynchronously. When code running in async is calling a custom event, this should be specified in order to prevent errors and corruption. "
                    + "Second, you can specify multiple custom event ids. This allows users of your custom events to choose from a variety of possible ids to list for custom events. "
                    + "Note that you must specify at least one id, otherwise no event will be called.");
    Registration.registerEvent("Custom Event", EvtCustomEvent.class, SkriptCustomEvent.class, "ev[en]t %strings%")
            .document("Custom Event", "1.6.7", "Called when the Call Custom Event effect is used with the specified id or one of the specified ids. "
                    + "This is used as a way for Skripters to create their own \"events\". See the Call Custom Event effect for more info.");
    Registration.registerExpression(ExprIDOfCustomEvent.class, String.class, ExpressionType.SIMPLE, "(0¦id|1¦ids) of custom event", "custom event's (0¦id|1¦ids)")
            .document("ID of Custom Event", "1.6.7", "An expression, used in the Custom Event event, for either the primary id, or all ids (MundoSK 1.8+), of the custom event that was called. "
                    + "The primary id means the one that was listed first when calling the custom event. See the Call Custom Event effect for more info.");
    Registration.registerExpression(ExprArgsOfCustomEvent.class, Object.class, ExpressionType.SIMPLE,"args of custom event", "custom event's args")
            .document("Args of Custom Event", "1.6.7", "An expression, used in the Custom Event event, for a list of the arguments, if any, "
                    + "that were specified for this particular custom event call. See the Call Custom Event effect for more info.");
    Registration.registerExpressionCondition(CondLastCustomEventCancelled.class, ExpressionType.SIMPLE, "last [called] custom event (0¦was|1¦wasn't) cancelled")
            .document("Last Called Custom Event was Cancelled", "1.8", "Checks whether the last custom event that was called in this trigger was or wasn't cancelled. "
                    + "This expression/condition is unaffected by whether another section of code calls a custom event. See the Call Custom Event effect for more info about custom events.");

    try {
        List<ClassInfo<?>> classes = (List<ClassInfo<?>>) Reflection.getStaticField(Classes.class, "tempClassInfos");
        for (int i = 0; i < classes.size(); i++) {
            registerCustomEventValue(classes.get(i));
        }
    } catch (Exception e1) {
        Logging.reportException(CustomEventMundo.class, e1);
    }
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:36,代码来源:CustomEventMundo.java

示例15: load

import ch.njol.skript.lang.ExpressionType; //导入依赖的package包/类
public static void load() {
    Logging.info("You uncovered the secret TerrainControl syntaxes!");
    Registration.registerEffect(EffSpawnObject.class, "(tc|terrain control) spawn %string% at %location% with rotation %string%")
            .document("Spawn Custom Object", "1.4.4 or earlier", "Spawns the specified custom object at the specified location with the specified rotation, rotation can be \"north\", \"south\", \"east\", or \"west\".");
    Registration.registerExpression(ExprBiomeAt.class, String.class, ExpressionType.PROPERTY,"(tc|terrain control) biome at %location%")
            .document("Biome at Location", "1.4.4 or earlier", "An expression for the TerrainControl biome at the specified location.");
    Registration.registerExpressionCondition(CondTCEnabled.class, ExpressionType.PROPERTY,"(tc|terrain control) is enabled for %world%")
            .document("TerrainControl Is Enabled", "1.4.9", "Checks whether TerrainControl is enabled for the specified world.");
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:10,代码来源:TerrainControlMundo.java


注:本文中的ch.njol.skript.lang.ExpressionType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。