Which bukkit plugins




















Jeremy Laukkonen is automotive and tech writer for numerous major trade publications as well as the creator of a popular blog and video game startup. A fan of EVs since the early s, he stays up-to-date on the myriad complex systems that power battery electric vehicles. Bukkit plugins, which work with both CraftBukkit and Spigot, make it extremely easy to modify and secure a Minecraft server. With the right set of plugins, you can add powerful administration tools, make it impossible for trolls to grief your players, create brand new gameplay experiences, and more.

Bukkit is an application programming interface API that programmers can use to create plugins for Minecraft. It basically makes it a lot easier for programmers to make plugins and server administrators to install them. The original Bukkit was a modified fork of the official Minecraft server program, which means that the developers took the Minecraft server code and modified it to automatically install and run Bukkit plugins.

That project ended when Minecraft publisher Mojang bought the Bukkit team, but you can still use Bukkit plugins with Spigot and CraftBukkit servers.

These plugins don't work with the official Minecraft server that you can download from Mojang. Here are the basic rules to follow if you want to use Bukkit plugins:. If you are running a local server, simply drag the.

If you use a hosting service, you will need to upload the. Contact your Minecraft server host for more details. There are tens of thousands of Bukkit plugins, so finding the best ones for your server can be a daunting task. If you're looking for a new gaming experience for your players, then a plugin like mcMMO that adds massively multiplayer online MMO features might be what you're looking for, but there are also plugins that add minigames, create in-game economies, vastly improve the villager non-player characters NPCs , and more.

Here are the best places to find Bukkit plugins:. To help you get started, we've also pulled together 10 of the most essential Bukkit plugins for your Minecraft server. If you just want to get your server up and running smoothly, or you want to protect and improve an existing server, you can't go wrong with these. Vault isn't a flashy plugin, but it is absolutely essential if you want to run a server that uses a lot of plugins. It manages interactions between other plugins to keep things running smoothly and provides a framework for chat modifications, economy systems, user permissions, and more.

Since a lot of popular plugins don't work without Vault, it should be one of the first Bukkit plugins you download.

This plugin gives the server admins the ability to set and change which commands specific players are able to use. It works entirely in-game, so there's no need to edit configuration files and restart the server every time you want to give or remove, permissions from someone. While bPermissions is a powerful tool for server admins, it is one of the many Bukkit plugins that require Vault.

So make sure to grab that first. Essentials provides Minecraft server admins with over useful commands and tons of features like kits for new players. It was one of the most useful Bukkit plugins available, but it ceased development prior to the release of Minecraft 1. EssentialsX is a fork of the original Essentials plugin that runs on newer versions of Minecraft.

It requires Vault for some features to work, but it provides all of the same utility as the original Essentials Bukkit plugin. WorldEdit provides you with powerful tools to shape and change the landscape of your Minecraft server.

Rather than placing individual blocks, it allows you to change every single block within a defined volume to whatever type of block you like. Additional commands make it easy to build walls, copy and paste structures, and even undo mistakes. WorldEdit is also required by some other plugins. DynMap is like Google Maps for your Minecraft server.

It creates a highly detailed overhead view of your world that anyone can access from a web browser, and it updates in real-time, so you can even see where each player is in the world. The main purpose of WorldGuard is to protect specific areas of your server. Plugin Library required for most of my Bukkit Plugins. It is rather old and not really updated anymore Most of it is just deprecated already.

Spigot plugin built for 1. Proxy, Bukkit plugin that allows connecting to beta b1. Premium custom monsters plugin with skill system, natural spawning and lots of sickest features! A unique software working with BungeeCord as a standalone light-weight server selection server to replace hub servers. A Minecraft mod - server plugin pair that adds custom GUIs and overlays. No more inventory and chat menus!

An API to introduce a version compatibility layer for minecraft spigot servers. A modern and customizable Bukkit plugin to divide enderchest into multiple inventories.

Command , not org. Command this is the command block , or add these two lines at the top of your file:. You will also need to add the command to your plugin. Add the following to the end of plugin. You may have noticed the CommandSender sender parameter above.

CommandSender is a Bukkit interface which has two useful for plugin writers subclasses: Player and ConsoleCommandSender. There are also other subclasses that are less common such as BlockCommandSender. When you're writing your plugin, it's a very good idea to ensure that commands that can be run from the console actually work, and that commands that should only be run as a logged-in player really are only run as a logged-in player. Some plugins simply return if the sender is not a player i. In this example, the command basic can be run by anyone - a logged-in player, or the server operator on the console.

But the command basic2 can only be run by logged-in players. In general, you should allow as many commands as possible to work on both the console and for players. Commands that need a logged-in player can use the mechanism in the example above to check that the CommandSender is actually a player before continuing. Such commands would generally depend on some attribute of the player, e.

If you want to get more advanced, you could do some extra checks on your command arguments so that e. The examples above just put the onCommand method into the plugin's main class. For small plugins, this is fine, but if you're writing something more extensive, it may make sense to put your onCommand method into its own class.

Fortunately, this isn't too hard:. Notice how we send a reference of the main plugin object to MyPluginCommandExecutor. This allows us easy access to the main plugin objects's methods if we need to. By doing this, we can better organise our code - if the main onCommand method is large and complex, it can be split into submethods without cluttering up the plugin's main class. Note that if your plugin has multiple commands, you will need set the command executor for each command individually.

When writing an onCommand, it's important that you don't assume any information, such as the sender being a Player. Things to keep in mind:. Sometimes you want to get another player by the name entered by the player. Always make sure the player is online! If you need to modify a Player currently not online, the OfflinePlayer class provides basic manipulation methods. The Bukkit API provides a convenient way for plugins to manage user configurable settings.

Additionally it also serves as an easy way to store data. With the new Bukkit API for permissions, they couldn't be easier. To find out if a player has a particular permission use the following:. You can also find if a permission has been set or not equivalent to Java's null with the following function:.

You may be wondering why there aren't any groups. The answer to that is because they aren't really needed. Previously one of the main uses for groups was to format chat messages. That however can be done just as easily with permissions.

Inside your chat plugin's config you would define associations between permissions and prefixes. For example the permission "someChat. Whenever a player speaks with that permission their name will be prefixed with [Admin]. Another common usage might be to send a message to all users within a group.

Again however this can be done with permissions with the following:. Finally you may be asking, well how do I set and organise player's permissions if there are no groups? Although the bukkit API doesn't provide groups itself, you must install a permission provider plugin such as permissionsBukkit to manage the groups for you. This API provides the interface, not the implementation. If you want more control over your permissions, for example default values or children then you should consider adding them to your plugin.

This is completely optional, however it is advised. Below is an example permissions config that would be appended to the end of your existing plugin. Firstly, each permission your plugin uses is defined as a child node of the permissions node. Each permission can then optionally have a description, a default value, and children. By default when a permission isn't defined for a player hasPermission will return false.

Inside your plugin. This has changed with the bukkit API and you can now define the child permissions. This allows for a lot more flexibility. Below is an example of how you do this:. Here the doorman. The way child permissions work is when doorman. If however doorman. If you wish to know about developing your own permissions plugins Ones that actually set permissions then check out the tutorial on Developing a permissions plugin. Currently, Minecraft servers operate nearly all of the game logic in one thread, so each individual task that happens in the game needs to be kept very short.

A complicated piece of code in your plugin has the potential to cause huge delays and lag spikes to the game logic, if not handled properly. Luckily, Bukkit has support for scheduling code in your plugin.

You can submit a Runnable task to occur once in the future, or on a recurring basis, or you can spin off a whole new independent thread that can perform lengthy tasks in parallel with the game logic. There is a separate Scheduler Programming tutorial which introduces the Scheduler, and gives more information on using it to schedule synchronous tasks, and on kicking off asynchronous tasks in Bukkit.

The easiest way to create blocks is to get an existing block and modify it. For example, if you want to change the block that is located five blocks above you, you would first have to get your current location, add five to your current y-coordinate, and then change it.

For example:. The above code gets the player's location, gets the block five blocks above the player, and sets it to stone. Note that once you have a Block , there are other things you can do besides set its type.

Consult the JavaDocs for more information. You can use a similar concept to generate buildings and individual blocks programmatically through the use of algorithms.

For example, to generate a solid cube, you could use nested for loops to loop over an entire cube and fill it in. This method will construct a 3D cube or cuboid with the given length and starting point. As for deleting blocks simply follow the same method for creating them but set the ID to 0 air. This section mostly covers player inventory manipulation, but the same applies to chest inventory manipulation as well if you find out how to get a chest's inventory :P.

Here is a simple example of inventory manipulation:. So inside onPlayerJoin we first make a few variables to make our job easier: player, inventory and itemstack.

Inventory is the player's inventory and itemstack is a ItemStack that has 64 diamonds. After that we check if the player's inventory contains a stack of diamonds. So inventory manipulation isn't actually that hard, if we wanted we could remove the stack of diamonds by simply replacing inventory.

Hopefully this helped! When dealing with items in the code, you use the ItemStack class for looking up and setting all information on that stack. To enchant an item you must first know the Bukkit enchantments. If you want to enchant items that can't be enchanted inside normal SMP, use addUnsafeEnchantment instead of addEnchantment. You can also set the lores of an item. Bukkit is trying to make plugin development as easy as possible, so HashMaps with key of type Player, Entity, World or even a Block were replaced by Metadata.



0コメント

  • 1000 / 1000