[Request] C# Plugin Integration - Make plugins with C#

Discussion in 'Archived: Plugin Requests' started by tommyz_, May 13, 2014.

  1. Offline

    tommyz_

    What would this plugin do?
    What this plugin would have is some kind of reference to a C# library to be able to load C# classes into this java plugin. So basically when this plugin loads it will load all of your custom C# plugins or "compiled C# class .dll" you have created that are in some directory, and it will have coding and commands associated with that plugin. Then to add a dll, the plugin could search for a text file of which .dlls are listed, to load into the plugin.

    I believe this sort of thing would be possible, but it just hasn't been done yet.
    When someone is making a C# class they could also reference some kind of library, example would be a java library or something to pull up the methods from the bukkit class to get all the usable methods to use for plugins. The developer may have to make a new C# project to show users the methods to use in order to do different things within minecraft.

    Some ways to do this?
    Here's one way to embed Java in C#, but i'm sure there are many other ways: http://resources.infosecinstitute.com/java-code-embedding-c/
    And another way from C# to java with jni4net by using a Bridge: http://jni4net.sourceforge.net/
    One way to use C# dll as a wrapper into java: http://www.codeproject.com/Articles/378826/How-to-wrap-a-Csharp-library-for-use-in-Java

    This could be a huge project, but probably worth it for people who love C#.
     
  2. Offline

    timtower Administrator Administrator Moderator

    tommyz_ This is one of the most difficult requests I have seen so far. I know that they did it with Python already though, but I am not sure how it would work with C#
    Certainly if you realize that those files should be loaded as java classes somehow
     
  3. Offline

    tommyz_

    Do you know what the python one is called?

    The SwiftApi one looks almost like what i'm looking for, i'm looking into it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  4. Offline

    timtower Administrator Administrator Moderator

  5. Offline

    oscarshi1995

    Doesnt C# Only work on windows?
     
  6. Offline

    MadusU

    I actually don't know. But the game making program unity, allowes you to code in C#. And then your game works on all platforms.q so in some way can C# work on almost all platforms.
     
  7. Offline

    Adriani6

    It actually is as it uses .NET framework which is only for Windows (It's developed by Microsoft I believe), but then you can still get C# working on other platforms by using some sort of cross-platform implementation of C# such as mono-project.
     
  8. tommyz_ I think you're missing a section here: "Why?" Sure, I guess this can be made. And you say that it would be "worth it for people who love c#" but personally I don't believe it's worthwhile. It seems easier & more reliable for people to just learn Java - and there's nothing wrong with knowing another language!
     
  9. Offline

    Garris0n

    Maintaining another API in a different language sounds like a huge pain to me, and doesn't really seem to have much of a purpose.
     
    AdamQpzm likes this.
  10. Offline

    Alshain01

    C# was originally developed my Microsoft, yes. But the language is now defined by ECMA and ISO standards. As such it can now be developed in Mac and Linux... just not with the .NET compiler.

    I have to agree here. I speak as someone who knew C# prior to starting Java and the two are very very similar in nature since they are both derived from C-Style syntax and are garbage collected languages. Java has an edge on almost requiring good OOP (which in my mind is a plus) while C# is a little more lax, especially when referring to control events. But really, if you know one, the other won't take long to learn.
     
  11. Offline

    Gopaintman

    Why do this though? Java already is a fairly heavy language. Why make the computer translate one language into another and then go through the process that Java requires anyways?
     

Share This Page