• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MCForge.Plugin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Plugin类属于MCForge命名空间,在下文中一共展示了Plugin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Register

 /// <summary>
 /// Register this event
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 public static void Register(Group.GroupSave method, Priority priority, Plugin plugin)
 {
     if (Find(plugin) != null)
         throw new Exception("The user tried to register 2 of the same event!");
     events.Add(new OnGroupSaveEvent(method, priority, plugin));
     Organize();
 }
开发者ID:EricKilla,项目名称:MCForge-Vanilla,代码行数:13,代码来源:OnGroupSaveEvent.cs


示例2: Register

 /// <summary>
 /// Register this event
 /// This will call the method "method" everytime this event is triggered
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 public static void Register(Player.OnPlayerConnect method, Priority priority, Plugin plugin)
 {
     if (Find(plugin) != null)
         throw new Exception("The user tried to register 2 of the same event!");
     events.Add(new OnPlayerConnectEvent(method, priority, plugin));
     Organize();
 }
开发者ID:EricKilla,项目名称:MCForge-Vanilla,代码行数:14,代码来源:OnPlayerConnectEvent.cs


示例3: Register

 /// <summary>
 /// Register this event
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 public static void Register(Server.OnConsoleCommand method, Priority priority, Plugin plugin)
 {
     if (Find(plugin) != null)
         throw new Exception("The user tried to register 2 of the same event!");
     events.Add(new OnConsoleCommandEvent(method, priority, plugin));
     Organize();
 }
开发者ID:PinEvil,项目名称:MCForge-Vanilla,代码行数:13,代码来源:OnConsoleCommandEvent.cs


示例4: Register

 /// <summary>
 /// Register this event
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 public static void Register(Player.BlockchangeEventHandler method, Priority priority, Plugin plugin)
 {
     if (Find(plugin) != null)
         throw new Exception("The user tried to register 2 of the same event!");
     events.Add(new OnBlockChangeEvent(method, priority, plugin));
     Organize();
 }
开发者ID:EricKilla,项目名称:MCForge-Vanilla,代码行数:13,代码来源:OnBlockChangeEvent.cs


示例5: UnRegister

 /// <summary>
 /// UnRegister this event
 /// </summary>
 /// <param name="plugin">The plugin object that has this event registered</param>
 public static void UnRegister(Plugin plugin)
 {
     if (Find(plugin) == null)
         throw new Exception("This plugin doesnt have this event registered!");
     else
         events.Remove(Find(plugin));
 }
开发者ID:B00mX0r,项目名称:MCForge-MCLawl,代码行数:11,代码来源:OnMessageRecieveEvent.cs


示例6: Register

 /// <summary>
 /// Register this event
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 /// <param name="bypass">Register more than one of the same event</param>
 public static void Register(Level.OnLevelLoaded method, Priority priority, Plugin plugin, bool bypass = false)
 {
     if (Find(plugin) != null)
         if (!bypass)
         throw new Exception("The user tried to register 2 of the same event!");
     events.Add(new OnLevelLoadedEvent(method, priority, plugin));
     Organize();
 }
开发者ID:xShOtDoOdx,项目名称:MCForge-MCLawl,代码行数:15,代码来源:OnLevelLoadedEvent.cs


示例7: Register

 /// <summary>
 /// Register this event
 /// </summary>
 /// <param name="method">This is the delegate that will get called when this event occurs</param>
 /// <param name="priority">The priority (imporantce) of this call</param>
 /// <param name="plugin">The plugin object that is registering the event</param>
 /// <param name="bypass">Register more than one of the same event</param>
 public static void Register(Player.OnPlayerChat method, Priority priority, Plugin plugin, bool bypass = false)
 {
     if (Find(plugin) != null)
         if (!bypass)
         throw new Exception("The user tried to register 2 of the same event!");
     events.Add(new OnMessageRecieveEvent(method, priority, plugin));
     Organize();
 }
开发者ID:B00mX0r,项目名称:MCForge-MCLawl,代码行数:15,代码来源:OnMessageRecieveEvent.cs


示例8: Find

 /// <summary>
 /// Find a event
 /// </summary>
 /// <param name="plugin">The plugin that registered this event</param>
 /// <returns>The event</returns>
 public static OnPhysicsUpdateEvent Find(Plugin plugin)
 {
     foreach (OnPhysicsUpdateEvent p in events.ToArray())
     {
         if (p.plugin == plugin)
             return p;
     }
     return null;
 }
开发者ID:NorthPL,项目名称:MCForge-Vanilla-Redux,代码行数:14,代码来源:OnPhysicsUpdate.cs


示例9: Find

 public static OnBlockChangeEvent Find(Plugin plugin)
 {
     foreach (OnBlockChangeEvent p in events.ToArray())
     {
         if (p.plugin == plugin)
             return p;
     }
     return null;
 }
开发者ID:Goodlyay,项目名称:MCForge-Vanilla-Redux,代码行数:9,代码来源:OnBlockChangeEvent.cs


示例10: Find

 /// <summary>
 /// Find a event
 /// </summary>
 /// <param name="plugin">The plugin that registered this event</param>
 /// <returns>The event</returns>
 public static OnConsoleCommandEvent Find(Plugin plugin)
 {
     foreach (OnConsoleCommandEvent p in events.ToArray())
     {
         if (p.plugin == plugin)
             return p;
     }
     return null;
 }
开发者ID:PinEvil,项目名称:MCForge-Vanilla,代码行数:14,代码来源:OnConsoleCommandEvent.cs


示例11: Find

 /// <summary>
 /// Find a event
 /// </summary>
 /// <param name="plugin">The plugin that registered this event</param>
 /// <returns>The event</returns>
 public static OnServerErrorEvent Find(Plugin plugin)
 {
     foreach (OnServerErrorEvent p in events.ToArray())
         {
             if (p.plugin == plugin)
                 return p;
             }
             return null;
 }
开发者ID:Cazzar,项目名称:MCForge-MCLawl,代码行数:14,代码来源:OnServerErrorEvent.cs


示例12: Find

 public static OnMessageRecieveEvent Find(Plugin plugin)
 {
     foreach (OnMessageRecieveEvent p in events.ToArray())
     {
         if (p.plugin == plugin)
             return p;
     }
     return null;
 }
开发者ID:B00mX0r,项目名称:MCForge-MCLawl,代码行数:9,代码来源:OnMessageRecieveEvent.cs


示例13: Config

 /// <summary>
 /// Create a new config object
 /// </summary>
 /// <param name="p">The plugin that is using the config object</param>
 /// <param name="c">The config type you want</param>
 /// <param name="filename">The file name (DONT INCLUDE EXTENTION)</param>
 public Config(Plugin p, ConfigType c, string filename)
 {
     this.filename = filename;
     if (!Directory.Exists("plugins/" + p.name)) Directory.CreateDirectory("plugins/" + p.name);
     if (!File.Exists("plugins/" + p.name + "/" + filename + ".config") && c == ConfigType.Setting) File.Create("plugins/" + p.name + "/" + filename + ".config");
     if (!File.Exists("plugins/" + p.name + "/" + filename + ".file") && c == ConfigType.SaveFile) File.Create("plugins/" + p.name + "/" + filename + ".file");
     this.p = p;
     this.c = c;
 }
开发者ID:WanX,项目名称:MCaznowl-Build,代码行数:15,代码来源:Config.cs


示例14: Find

 /// <summary>
 /// Find a event
 /// </summary>
 /// <param name="plugin">The plugin that registered this event</param>
 /// <returns>The event</returns>
 public static OnLevelLoadedEvent Find(Plugin plugin)
 {
     foreach (OnLevelLoadedEvent p in events.ToArray())
     {
         if (p.plugin == plugin)
             return p;
     }
     return null;
 }
开发者ID:xShOtDoOdx,项目名称:MCForge-MCLawl,代码行数:14,代码来源:OnLevelLoadedEvent.cs


示例15: Find

 public static OnPlayerChatEvent Find(Plugin plugin)
 {
     foreach (OnPlayerChatEvent p in events.ToArray())
     {
         if (p.plugin == plugin)
             return p;
     }
     return null;
 }
开发者ID:hirsty,项目名称:MCForge-Vanilla,代码行数:9,代码来源:OnPlayerChatEvent.cs


示例16: OnPlayerDisconnectEvent

 internal OnPlayerDisconnectEvent(Player.OnPlayerDisconnect method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
开发者ID:B00mX0r,项目名称:MCForge-MCLawl,代码行数:4,代码来源:OnPlayerDisconnectEvent.cs


示例17: OnMessageRecieveEvent

 internal OnMessageRecieveEvent(Player.OnPlayerChat method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
开发者ID:B00mX0r,项目名称:MCForge-MCLawl,代码行数:4,代码来源:OnMessageRecieveEvent.cs


示例18: OnPlayerRankSetEvent

 internal OnPlayerRankSetEvent(Group.RankSet method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
开发者ID:AnthonyANI,项目名称:MCForge-MCLawl,代码行数:4,代码来源:OnPlayerRankSetEvent.cs


示例19: OnLevelLoadedEvent

 internal OnLevelLoadedEvent(Level.OnLevelLoaded method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
开发者ID:xShOtDoOdx,项目名称:MCForge-MCLawl,代码行数:4,代码来源:OnLevelLoadedEvent.cs


示例20: OnServerErrorEvent

 internal OnServerErrorEvent(Server.OnServerError method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
开发者ID:Cazzar,项目名称:MCForge-MCLawl,代码行数:4,代码来源:OnServerErrorEvent.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Entity.Player类代码示例发布时间:2022-05-26
下一篇:
C# MCForge.Player类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap