Back to Programming

Get

In Progress

Simple bukkit plugin to get item information and upload it to hastebin.

12-04-2024

A quick note

This project is currently broken due to md-5.net going offline. I will need to rework the code to use a different pastebin service.

Overview

Get is a simple Bukkit plugin that allows players to upload the data of the item they are currently holding to Hastebin. This is particularly useful for sharing item data with server administrators or other players for troubleshooting or informational purposes. The plugin is made in Kotlin.

Features

  • Retrieves and formats item information including:
    • Item Type
    • Amount
    • Custom Name
    • Lore (If Any)
    • NBT Data/Item Flags
  • Uploads item data to Hastebin.
  • Generates a shareable link for easy access.

Installation

  1. Download the Get plugin JAR file from the releases page.
  2. Place the JAR file into your servers plugins directory.
  3. Restart your Minecraft server to load the plugin.

Usage

To use the Get plugin, hold the item you want the information of in the main hand and run the command /get. Thats it, the plugin will handle the rest and provide you with a Hastebin link containing the item data similar to this: https://paste.md-5.net/abc123

Code overview

Get is only 95 lines of code without any shrinking or optimizations. Most of the code is just command handling for the one command. The main logic I used to create get is just getting the information of the item, then just using a StringBuilder() under the variable name builder to format the data into a readable format. After that, I used an HTTP POST request to upload the data to Hastebin and get the link.

Source Code

The source code for Get is available on GitHub. You can view and contribute to the project by visiting the repository.

Review and Conclusion

This project broke when md-5.net went offline, so I need to rework for another pastebin service. Overall, this was a fun use of Kotlin and I might finish it later.