Suggested name: Full-Inventory Message What I want: So the title pretty much tells you what I am looking for. I have a custom auto-inventory but my developer retired and I need someone to develop a small, light weight message plugin where once they can no long fit any items in their inventories it will tell them In chat for every block they break. Ideas for commands: /fim reload /fim cooldown {x} (Global Cooldown between messages to reduce spam) Ideas for permissions: fim.reload fim.cooldown fim.message When I'd like it by: The end of the week would be nice
Just to be sure: When inventory is full and you break a block it will give you a message 'Your inventory is full! Could not pick up *name of item broken*'
Yes that is right, but maybe not say what block it is to reduce the lag. Also if possible make the message editable
Saying what block was broken will not cause any lag. I was just thinking, what if you went mining and are destroying your way back up and you keep getting spammed by this message because of all the useless cobblestone?
Here is something I put together @HazePvPHD It is just a simple plugin, should be pretty efficient. Maybe I can add an option to toggle the message off if a player has access to inventoryfull.alert to take care of you getting spammed? Konkz Here is the source: Code:java package me.clip.inventoryfull; import org.bukkit.Bukkit;import org.bukkit.ChatColor;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.configuration.file.FileConfiguration;import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.EventPriority;import org.bukkit.event.Listener;import org.bukkit.event.block.BlockBreakEvent;import org.bukkit.inventory.ItemStack;import org.bukkit.inventory.PlayerInventory;import org.bukkit.plugin.java.JavaPlugin; public class InventoryFull extends JavaPlugin implements Listener { static String full; @Overridepublic void onEnable() {loadConfig();saveConfig();loadMessage();Bukkit.getServer().getPluginManager().registerEvents(this, this);} private void loadConfig() {FileConfiguration c = getConfig();c.options().header("InventoryFull version "+ getDescription().getVersion()+ "\nCreated by: extended_clip"+ "\nValid placeholders:"+ "\n%block% - display the dropped item type"+ "\n%player% - display the players name");c.addDefault("full_message", "&cYou don't have room in your inventory to collect that &f%block%&c!");c.options().copyDefaults(true);} private void loadMessage() {full = getConfig().getString("full_message");} @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)public void onBlockBreak(BlockBreakEvent e) { Player p = e.getPlayer(); if (!p.hasPermission("inventoryfull.alert")) {return;} PlayerInventory i = p.getInventory(); ItemStack wontFit = null; for (ItemStack drop : e.getBlock().getDrops()) { for (ItemStack is : i.getContents()) {if (is == null) {return;}if (is.getType().equals(drop.getType())&& is.getAmount() + drop.getAmount() <= 64) {return;}}wontFit = drop;} sms(p, full.replace("%player%", p.getName()).replace("%block%", wontFit.getType().toString().toLowerCase().replace("_", " "))); } public void sms(CommandSender s, String msg) {s.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));} @Overridepublic boolean onCommand(CommandSender s, Command command, String label,String[] args) { if (s instanceof Player) {Player p = (Player) s;if (!p.hasPermission("inventoryfull.admin")) {sms(s, "&cYou don't have permission to do that!");return true;}} if (args.length == 0) {sms(s, "&cInventoryFull &fversion " + getDescription().getVersion());sms(s, "&7Created by: &cextended_clip");sms(s, "&7/invfull reload &f- &cReload config file");}else if (args.length > 0 && args[0].equalsIgnoreCase("reload")) {reloadConfig();saveConfig();loadMessage();sms(s, "&cInventoryFull &7configuration successfully reloaded!");}else {sms(s, "&cIncorrect usage! Use &7/inventoryfull");} return true;}} Here are the permissions/commands from the plugin.yml: Code: name: InventoryFull author: extended_clip main: me.clip.inventoryfull.InventoryFull version: 1.0 description: Be alerted when your inventory is full! permissions: inventoryfull.admin: description: Ability to use /inventoryfull and /inventoryfull reload default: op inventoryfull.alert: description: be alerted when your inventory is full and you mine a block that won't fit! default: true commands: inventoryfull: description: Admin command for InventoryFull aliases: [invfull, infull] Here is the plugin download: InventoryFull.jar
Thanks man, just a quick question, could you add an auto-inventory which support worldguard and plotme. With this also a auto-smelt which supports up to fortune 50. Say they have fortune 20 they get 1-20 ironingots. If you can do this kit would be epic!! And just one more request, upon mining any ore it will autocraft it into its blocks, this will stop a lot of clustering. Thanks so much for the auto-inv but if you can do this too it would be epic!!
I would most likely not want to include those features in InventoryFull. All are very simple and I am capable of making but I know there are working plugins available that do exactly what you want. Search google a bit or even this forum, you will find what you are looking for.
I have searched google for hours on end, I have found some plugins but they have things wrong with them, for example: Auto-Smelt not compatiable with Fortune, Auto-Inventory needs to be enabled (I want it automatically on with no way to disable it) and I have not been able to find one for the auto-crafting of the ores as they are mined. If you be able to make all this into one that would be amazing!! Suggested Name: PrisonBlocks
I will make a plugin that has the auto smelt feature, and the blocks to inventory tomorrow. It will be a separate plugin aside from the InventoryFull plugin.
Ok Thanks a bunch!!! Also would you like be a developer on my server, and also will this include the auto-craft, once they have 9 coal, 9 diamonds, 9 emeralds, 9 gold ingots, 9 ironingots, 9 redstone, 9 lapislazuli it will take that and give them the block. Also one last thing, with your EZRanksLite, how do I stop the scoreboard from flashing and is there a way to enable it for everyone who joins, so its ALWAYS on. PS. with the plugin you will make please make no permissions or commands, just as long as it is ALWAYS on. So Auto-Smelt (Compatiable with Fortune 1-50), Auto-Craft, Auto-Inv all in one with no permissions, that would be great THANKS!
Your plugin is very helpful.. However if you can can you please use the HoloAPI and ProtocolLib to make the messages come where the block was broken in this form &4&LINVENTORY FULL and have an XP noise everytime? I know this might be copying some servers but I want this because my friends & I are doing a mining contest...