JCore

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

JCore

What is it?

JCore is a land management, economy, and chat API. It's main part is the land management.

For Server Owners

Plugins may use this plugin to limit their plugins functionality to specific areas. One example is towns. The plugin store the land data in highly compressed binary files. That way you can use a lot of land without the data file growing out of control. A chunk is at maximum 1272 bytes, that means that one Gigabyte is roughly 800 000 chunks. If each player want's an area of 500x500 blocks then it would be enough for more than 800 players.

JCore is also a special purpose Webserver. It can display info from the plugins on your server, it can also let you change the settings on it. All players needs to create a login first, before they can set any settings. Normally you only need a normal http connection, but if you a running a larger server and want a http secure connection (or https), you can enable that, but it does require a valid certificate.

JCore runs best (but it doesn't require) with a database connected to it. On the first start the plugin will run you through a installation wizard in order to install MySQL community server. If you already have a database or want to install another one you have the option to use that instead. Some plugins that relies on JCore might not work without a database.

It does also makes it more simple for plugins and for you to add more language. Plugins may add their own languages (Everyone must support English, more specific en-US), and you can also easily modify a language if you want to from any plugin using this JCore's language handler. You can set a default language for the server, and if you want to players may also set their preferred languages for themselves. This is done by players with simple commands like /lang en-US or like /english, or /svenska. For languages that have difrent versions. Like english which have both American english and Enland english and Australian english, you just specify the region after the command, like /english australia, by default if no region tag is specified it will go after the most popular region. In this case America.

For Developers

JCore basicly limits the events so that events are only fired to those plugins that owns the land that the event is fired from. For example when a BlockPlaceEvent is fired it will directly send it to the land area(In the plugin referred as Collection) that the block was placed in. Other "Collections" will not receive that event. The event can also be passed to a plot within the collection. For simplicity the plugin does also contains all you need for currency, so there is no need to link with Vault or a currency plugin, JCore does that for you. The same applies to chat. JCore does also have functions to make the localization of your plugin much easier. You will be able to reach the world with ease. It does also comes with easy functions to handle SQL. You should see this plugin as a set of tools. You might not want to use the land management, but instead you want to use the SQL functions.

Useful links

Questions

Is it very storage consuming?

Well that depends. A chunk is at maximum 1272 bytes, that means that one Gigabyte is roughly 800 000 chunks. So if you intend to claim like 80 million chunks you might start getting problems. Note that area claiming is freeform so a chunk might be smaller than 1272 byte.

Is it very ram consuming

That is optional, the plugin has a land cache. You can configure how many chunks that can at most be contained within it. A chunk is 1272 bytes at most. Note that it takes a little more data while in the ram, but not more than a few bytes extra. The cache does also contain a list of the coordinates of all chunks contained in the save file. This list can't be configured, and it most be there for good efficiency in the cache (It's pointless to search the file for a chunk that isn't there anyway). The size of that list is exactly the amount chunks in the save file time eight. So a file with 800 000 chunks will return in a list that is 64 megabytes big.

Does the plugin creates lag?

Not that I'm aware of. It depends totally on the plugins that use it. It doesn't use any events by itself, it only passes them to the plugin that owns the area that the event was fired from. The saving is handled in it's own thread, and does not interfere with the main minecraft thread in any way. On shutdown there might be a delay while its saving, if a lot of area is claimed it might take a few seconds. If the server is under heavy load when it starts the save thread, it might be possible that a slight lag might show. Note that a save thread is not very CPU consuming. The speed of the saving is most often limited to the speed of your hard drive, a modern SSD drive will make the saving go much faster than an old SATA drive.

Permissions

There is only a very few permissions. Most of the commands must be done from the console. And the commands is basically to remove collections, cleaning maps and stuff like that.

Developer Section

Backwards capability with old plugins

What if I have made a plugin and want this to work with JCore. Do I need to totally rewrite the plugin? Well in most cases you can just make another plugin the gives the player the permission needed to use the plugin based on his current location. Lets say that you have made a world edit plugin. And you want it to only be used inside the specific collection. Then you can simply just give the permission necessary to use it when the players enter the collection, and then remove it when he steps out.

The plugin hierarchy

Here is a illustration of how JCore fits between your plugin and Bukkit.

http://dev.bukkit.org/media/images/49/819/plugin_hierchy.png

As you can see, JCore doesn't cover the entire Bukkit API. That's since its doesn't replace all bukkit functions, just some of them. Mainly the event handling. Your plugin should still extend JavaPlugin, and it should be set up as a normal plugin except when it comes to the events that has with land area to do. Instead of adding a listener to Bukkit your plugin should create a collection and add it to JCore.

The relation between the classes handling the land is shown here:

http://dev.bukkit.org/media/images/49/832/collections.png

How do I add my plugin to the language feature?

It's almost to easy actually. When you call any of the Lang class methods your plugin will be added. That does mean that the first message your plugin sends may take a second longer than the others. But who cares. Your plugin must however put all its ".lang" files inside a folder called "lang" inside it's .jar package. Your plugin must also follow a certain pattern inside the lang file, but that pattern is also very simple. The file names of the ".lang" files must follow the IETF language tag standard with one region subtag, for example en-US, en-EN, and sv-SE. Your plugin can only use languages that JCore supports, a list of all supported languages will be uploaded together with the release.

Plugin Metrics

The plugin uses MCStats.org to collect interesting information about the plugin. For example how many servers that are currently using it. It is a VERY small task, and you shouldn't even notice the difference from having it turned on or off. You may if you want, turn it off, but it would be more fun for everyone if you let it be on.

http://mcstats.org/signature/JCore.png


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    49686
  • Created
    Jan 9, 2013
  • Last Released File
    Never
  • Total Downloads
    0
  • License

Categories

Members

Recent Files

No files uploaded yet.