Coder Social home page Coder Social logo

onelitefeathernet / plugin-debug Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 394 KB

A simple library to upload plugin debugs for developer to fix bugs easier

Home Page: https://discord.onelitefeather.net

License: GNU Affero General Public License v3.0

Java 100.00%
api bukkit debug debugging hacktoberfest libary minecraft-plugin-development plugin

plugin-debug's Introduction

Plugin Debug

javadoc GitHub issues GitHub release (latest by date)

Description

Plugin Debug is a simple and modern library for collect some debug information of your plugin.
This library is inspired by Debug Paste of @IntellectualSites IntellectualSites
As a backend we use from lucko bytebin service to host/upload the debug files

Motivation

We maintain now more than one plugin/software plugin in java. Now it's time to build an api/library to help us to provide better support for users there use our plugins.

Focus

Our focus lies within a basic implementation of a generic api for collect server information and upload to a (custom) bytebin server .

More information / external links

Discord: https://discord.onelitefeather.de

Get started

Groovy
dependencies {
    // Core
    implementation 'dev.themeinerlp:plugin-debug:1.0.0'
    // Bukkit Extension
    implementation 'dev.themeinerlp.plugin-debug:bukkit-extension:1.0.0'
}
Kotlin DSL
dependencies {
    // Core
    implementation("dev.themeinerlp:plugin-debug:1.1.0")
    // Bukkit Extension
    implementation("dev.themeinerlp.plugin-debug:bukkit-extension:1.1.0")
}

Example

We have an example gradle module with an example bukkit command to retrieve a debug log. Also, we provide already a pre-hosted web ui for view your logs.

The hosted ui follows this structure:

https://debugpaste.onelitefeather.net/#/BYTEBIN_CODE/ENCODED_URL/
  • BYTEBIN_CODE
    • The returned code from ByteBin Server when the upload is successfully
  • ENCODED_URL
    • The ByteBin Server URL encoded in a friendly style

Example code(Kotlin):

// Example json object from GSON LIB
val obj = JsonObject()
obj.addProperty("Test", "Test")

val result =
    DebugBuilder.builder(BYTEBIN_BASE_URL)
        // Adds a file from path wrapped in a placeholder object
        .addFile(DebugFile(Path.of("config", "config.yml"), FileType.YAML, "Config as file object"))
        // Add a simple text to the debug
        .addText("Text test", "Text test")
        // Add json formatted string to the debug
        .addJson(Gson().toJson(obj), "Json test")
        // Upload to a bytebin server
        .upload()
// Encodes the URL as string
val encodedUrl = URLEncoder.encode(
    result.uploadServer,
    StandardCharsets.UTF_8
)
// ByteBin Code from Server
val code = result.code
// Prettified url 
val openUrl = "https://debugpaste.onelitefeather.net/#/$code/$encodedUrl/"
val component = MiniMessage.miniMessage().deserialize("<#05b9ff>[Example] <yellow><click:OPEN_URL:'$openUrl'>Click <u>here</u> to open the debug paste</click>")

plugin-debug's People

Contributors

onelitefeather avatar renovate[bot] avatar themeinerlp avatar

Watchers

 avatar

plugin-debug's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • gradle/wrapper-validation-action v2
  • actions/setup-java v4
  • gradle/gradle-build-action v3
.github/workflows/build_pr.yml
  • actions/checkout v4
  • gradle/wrapper-validation-action v2
  • actions/setup-java v4
.github/workflows/clode_invalid_prs.yml
  • superbrothers/close-pull-request v3
.github/workflows/release-drafter.yml
  • release-drafter/release-drafter v6
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
  • org.ajoberstar.grgit 5.2.2
  • net.lingala.zip4j:zip4j 2.11.5
  • com.google.code.gson:gson 2.10.1
bukkit-extension/build.gradle.kts
  • io.papermc.paper:paper-api 1.19.4-R0.1-SNAPSHOT
  • io.papermc:paperlib 1.0.8
example/build.gradle.kts
  • io.papermc.paper:paper-api 1.19.4-R0.1-SNAPSHOT
  • net.kyori:adventure-text-minimessage 4.16.0
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.3

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.