GithubHelp home page GithubHelp logo

Player inventory editor about bukkitgui2 HOT 16 OPEN

bertware avatar bertware commented on August 14, 2024
Player inventory editor

from bukkitgui2.

Comments (16)

Bertware avatar Bertware commented on August 14, 2024

While this would be useful, this is close to impossible. I can't alter the player data files while the server is running, and using a plugin would make it version and server dependant.

from bukkitgui2.

BetaPotato avatar BetaPotato commented on August 14, 2024

I don't see a good way to do this aside from making several plugin versions, or somehow making a plugin that is universally compatible with all versions. I will reopen this if I find a better way to do it.

from bukkitgui2.

spideynn avatar spideynn commented on August 14, 2024

@Bertware You could use the give command instead of directly modifying the player data files, although that might be dependent on the server software.

from bukkitgui2.

Bertware avatar Bertware commented on August 14, 2024

That would work, but it's limited to giving items only, not viewing or editing the inventories (which is what @technoguy20000 meant)

from bukkitgui2.

BetaPotato avatar BetaPotato commented on August 14, 2024

I've heard from a plugin developer that the plugin is not version specific if it doesn't have version specific imports, in other words, using only the BukkitAPI

from bukkitgui2.

BetaPotato avatar BetaPotato commented on August 14, 2024

Just by the way, the give command paired with the clear command (/clear [player] [item] [data] [maxCount] [dataTag]) and the .dat file for viewing the inventory, this approach still could work. A plugin would still be better though.

from bukkitgui2.

spideynn avatar spideynn commented on August 14, 2024

@Bertware I was thinking about making a plugin for it, since I figured out a way that shouldn't depend on a certain version using the Bukkit Inventory API. How should the information be transferred between the plugin and BukkitGUI?

from bukkitgui2.

Bertware avatar Bertware commented on August 14, 2024

The .dat file isn't up to date while the server is running I believe, or it's locked. It might be possible though, although it's not my number one priority.
A possible solution would be this:

  • User clicks "view inventory"
  • GUI sends command "/bukkitguihelp inventory (command limited to console operator only)
  • GUI receives JSON encoded array, hides the output from the user
  • GUI parses JSON and shows window

from bukkitgui2.

simon816 avatar simon816 commented on August 14, 2024

I vote a Sponge plugin, since Bukkit will be obsolete in a few months.

It should be an optional extra though.

from bukkitgui2.

spideynn avatar spideynn commented on August 14, 2024

@Bertware I tested this on my server, you can modify the .dat while the server is running but the player needs to disconnect before the changes save, or they get overwritten when something happens before the player leaves.

@simon816 I'll do both, but I need to learn the Sponge API first. I know that Glowstone & Spigot use the Bukkit API still. EDIT: Sponge looks a lot like Minecraft Forge modding, so Sponge support may take a while.

from bukkitgui2.

Bertware avatar Bertware commented on August 14, 2024

Before y'all start working on plugins or stuff: both glowstone and sponge support is planned or work in progress, but as far as I know they both don't work 100% as they should now.
Just a reminder, so you don't get disappointed when you want to test

from bukkitgui2.

spideynn avatar spideynn commented on August 14, 2024

I've almost finished the plugin, and here's the output when you do '/bukkitguihelp inventory playername' http://pastebin.com/L8DhNGad
I'm just trying to figure out why its adding (0) on the end of the item name, once I fix that the bukkit / spigot plugin is done. EDIT: Found out its not printing out equipped armor, so that needs to be fixed as well. πŸ˜ƒ

from bukkitgui2.

spideynn avatar spideynn commented on August 14, 2024

@Bertware @technoguy20000
Spigot, Bukkit, and Glowstone support for only reading the inventory is available here: https://github.com/spideynn/InventoryAPI-JSON/releases

The way this works is 0-35 are the inventory slots, and 36-39 are the armor slots. I'm working on a diagram for it at the moment. EDIT2: Fixed. https://github.com/spideynn/InventoryAPI-JSON/releases/tag/v0.2.1

from bukkitgui2.

Bertware avatar Bertware commented on August 14, 2024

I'm currently fixing up the server support before I'm continuing on this myself (if you know .NET, feel free to create an inventory edit window that takes the console output and player name, shows the inventory, and sends the necessary commands to alter the inventory)

from bukkitgui2.

spideynn avatar spideynn commented on August 14, 2024

@Bertware Yeah, I'll see what I can do with it. I just need to look through the codebase to learn how you do things in this.

from bukkitgui2.

Bertware avatar Bertware commented on August 14, 2024

You could add it to the MinecraftInterop namespace, a class and a form to edit inventories. I try to put all the forms in the UI folder/namespace, thought addon specific forms are in the corresponding addon folder/namespace. Since this would be globally available in both console and player list, I'd keep it as a global thing

from bukkitgui2.

Related Issues (20)

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.