Make org.bukkit.Location serializable

Discussion in 'Bukkit Discussion' started by SergeantH, Jan 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline


    Yes. Most Bukkit plugins reference the keyword 'this' when registering listeners, etc. This is essentially referencing the running instance of the org.Bukkit class. Is it possible to make org.Bukkit serializable?
  2. Offline

    Sagacious_Zed Bukkit Docs

    I suggest you go back to learning Java, that is not what 'this' means at all.
  3. Offline


    Reference 'this' instance right?

    Ok, so I may have learned java/programming from reading random forums posts and getting my hands dirty, so to speak, and I may have misunderstood quite a few things. But... I always thought that in a situation like this one:

    private Plugin plugin;
    public Plugin getPlugin() {
        plugin = this;
        return plugin;
    'this' would refer to the Bukkit instance. I was lead to believe this because I had to use similar code to pass the main Bukkit instance to different classes to use the getConfig() method. I most likely misunderstood why I needed to use the keyword because just by reading my own code snippet, I realize now that it would be passing 'this' instance of my plugin, right?

    So in a similar situation where I want to reference the same instance of a process from a seperate JVM (hence the serialization, using outputstreams), what exactly do I need to pass, and how would I serialize it?
  4. Offline


    Moved to the correct forum.
Thread Status:
Not open for further replies.

Share This Page