Hello. I want to ask you guys if you know any plugins that don't quit from the GUI directly when you press E or ESC Example: There is a GUI to select kits, You choose "Default Kits" and then you get on a new GUI with the default kits. If you try to quit from the gui by pressing E or ESC, the gui doesn't close directly, it goes you back to "Default Kits"
Don't worry; you're in the correct forum. I get what you mean. I have a KitPvP plugin that has kits and a GUI with already-made kits. It's not customizable (lol it was my first plugin) and you can still press E or ESC to exit out of it, but I don't know if it's possible to make what you're asking for. I'm no pro by any means; just trying to help But there are other plugins out there that do direct you back to the main page of the kits upon clicking them. I'll add some links here. My plugin: https://dev.bukkit.org/projects/xpvp Other plugins: https://dev.bukkit.org/projects/hero-kits-pvp CMI https://dev.bukkit.org/projects/battlekits https://dev.bukkit.org/projects/lmckits-pvp-kits-plugin https://dev.bukkit.org/projects/elitekits https://dev.bukkit.org/projects/prepare-for-pvp https://dev.bukkit.org/projects/kit-pvp Hope some of those help! If you want I can try and modify my plugin to do something similar to that.
You'd probably have to get in contact with a developer to make this for you. I'm not entirely sure what you want to be a part of the plugin, so I can't help you at the moment. I'd be happy to make this for you, but you have to give me more information about what you want the plugin to contain.
Thanks but i don't need a kit plugin, the kits in my thread was just an example. I want for every kind of gui Hmm because im bad at english i can't explain it more but i will try. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Oh I see. So you're looking for something that disables closing the GUI? This seems quite simple, so I think their should be some plugins out there. You just check if the player's inventory is open, then cancel the event. If you want I can give a crack at it. EDIT: Never mind; not simple xD I just tried it; apparently InventoryCloseEvent is client side, so you can't cancel the event that easily. Sorry about that. Anyone else want to try? Code: package disable.gui.xp10d3; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.plugin.java.JavaPlugin; public class Core extends JavaPlugin implements Listener { FileConfiguration config = getConfig(); public void onEnable() { loadConfig(); this.getServer().getPluginManager().registerEvents(this, this); } public void loadConfig(){ getConfig().options().copyDefaults(true); saveConfig(); } //String check = this.getConfig().getString("world.check."); @EventHandler public void checkInv(InventoryCloseEvent event) { } }
@Xp10d3 Try using Player#openInventory(event#getInventory()) instead of cancelling the event. You might have to run this 1 tick later.
Alright. Thanks. This is a noob question but how do I get the player inside InventoryOpenEvent? I can't do Player player = event.getPlayer(); or event.getWhoClicked().
@Xp10d3 InventoryCloseEvent & InventoryOpenEvent both have a getPlayer() method, though it returns a HumanEntity, so you need to cast it to a player.
Oh heck. I think it should still work. I don't know how GUI's work, but above 1.12 is just an estimate. I'm sure 1.7+ could work as well. Sorry, I don't know; try it and see.
Then please post a version number when requesting a plugin. Or use the entire suggested format. Do you have errors? If so: please post them.
I didn't ask to make a plugin, i just asked if there are any available. I appreciate it @Xp10d3 for making the plugin but still i don't know what's wrong, i don't even get any errors on console Sorry for my late reply
All good. And I don't think there are any available. So is there anything wrong with the plugin? I don't exactly know what you mean by: Is something wrong with the plugin? Did you check at the very very top of your console? If the plugin is outdated or if there is something wrong with the version, plugin.yml, etc. it's at the top.
Ok so does it work?? If not why; does it cancel closing out the event? I need to know what you mean by it's not working please.
Ehm don't blame me... i just found the error in latest.log file i was trying to find it from console.. Sorry for wasting your time guys https://pastebin.com/d81jP6rZ
Console does not always go back far enough Open up the jar with a zip program, open the plugin.yml Change this line: Code: main: disable.gui.xp10d3 into Code: main: disable.gui.xp10d3.Core @Xp10d3
Hey, lol I don't want a plugin that disables to quit from a GUI Here an example of what i want. You open a kit gui, In this gui there are 2 selections, default kits and donator kits, you click on default kits and you go in a new gui, if you press E or ESC the gui will not close, you will be moved back to Selection Kit gui THIS IS AN EXAMPLE, i want this for every kind of guis With this plugin i can't even close the gui
@Invenstory Then provide all information in full detail. How it works, commands, permissions, configuration. The information that you have provided is very minimal.
Like tim said I'm super confused on what you want. I thought you wanted something that disables quitting a GUI. And also the thing tim sent doesn't necessarily mean thats what the plugin is; usually my packages are along the lines o xp10d3.corelia.online or whatever. Anyway, what exactly are you talking about? Do you want something that moves you to a different GUI or what? Cause what I'm getting is that you want me to create something that moves you from one GUI to another which isn't necessarily possible since I don't have the code for what plugin you're using and therefore cannot change something that isn't from the same plugin.