So I first looked around for if anyone had created a plugin or requested something as I'm about to request. And I saw the Restaurant Plugin, but sadly it isn't like anything I want so I discarded that one from my mind. I saw two other requests, which by the way, was SUCH a great concept. I honestly wished that there was a plugin like they requested. So I decided to touch up on it, and make my own idea of the requests and give you my idea of Take-Out Plugin. Plugin Catergory: Fun Minecraft Version: 1.9.X Suggested Name: Take-Out Delivery Plugin What I Want: My first suggestion is the main basis of the plugin. The ability to order take-out will be added via installing the plugin. Once you install the plugin into the server, you would have to set the area where you want your delivery man to spawn at, using the command /takeout setspawn [NameOfSpawn] (This variable is needed if you want more than one delivery spots.) If you want to get rid of a Delivery Spot a command will be needed. /takeout remove [DeliverySpot] Now that you have your delivery spots, you could type into chat /takeout order [NameOfDelivery] (This variable will be needed to know where the Delivery Boy will be after you order). This will open up a GUI with 9/18/27/36/45/54 slots of space (This could be configured in the config.yml file). If you already have items that you could order. You would select the item, and it will say Item Added to Cart! To end ordering, press ESC. Then it would say Thank you for ordering, our delivery boy will be there in 2-5 minutes!. After 2-5 minutes, then a NPC will spawn where that spawn is specified. It will have a skin where you could configure in the config.yml. To get your items, right click on the NPC and the items will be given to you. The NPC will disappear and you could enjoy your food! If you are an admin/operator, you could do this command /takeout edit menu. A GUI just like /takeout order will pop up. Instead, you will be able to edit the Menu for ordering, you could add more items, or change the pricing of items by selecting the item then going into chat and typing /takeout price [PriceInDollars]. If successful, this Message will be shown in chat Price change successful! If the player puts a price like -2, the message will go That pricing is not valid, please enter a valid price. To finish editing, type /takeout edit done This is an optional feature, but let say you want to have more than one takeout COMPANY. If it's McDonalds, or a family brand company. You would be able to make more than one company. Using /takeout create [NAME]. If you would want to add this option, you would need to add a new variable to the commands I have shown above. Such as /takeout order [NameOfDelivery] [CompanyName] or /takeout edit menu [CompanyName]. So now like I said before. This could be optional, you don't have to add it but I would appreciate if you could attempt it. If you could do it, I would appreciate that. But the first three paragraph are a must have if you are going to make this plugin request come true. Ideas for Commands: Optional /takeout create [CompanyName] /takeout setspawn [NameOfSpawn] /takeout remove [NameOfSpawn] /takeout order [NameOfDeliverySpot] Optional [CompanyName] /takeout edit menu Optional [CompanyName] /takeout price [PriceInDollars] /takeout edit done Ideas for Permissions: I don't know so the creator can go for it When I'd like it By: By August 6th, or whenever you could get it done I also request you could make the plugin public so other people could use the plugin EDIT by Moderator: merged posts, please use the edit button instead of double posting. EDIT by Thread Creator: Change of plans, I may need it by August 3
I want to give this a try. But can you explain a bit better on how to purchase items? Or , maybe it is a bit unclear. However, I like the idea!
To purchase items, the GUI would pop-up and you would left click on the item. It would say added to Cart. If you want to purchase MORE of that same item, you would keep left clicking it. Thank you for telling me about your uncertainty. I would be so glad if you did this. I've seen some of your plugins and they are spot on!
You can link into the Citizens 2 API and use it to create a trait like /trait TakeOut and add it to any NPC you want, then @Clasher8 can assign the skin for the NPC to use with citizens and he can also assign any name. Edit: Just be warned Citizens is currently a tad bit incomplete on 1.10 and unstable as the author hasn't released a stable build in quite some time but it should work fine for this as long as you don't intend to have the NPC move.
I understand if you can't finish the plugin. You don't have to do it anymore. I'll just look for someone else to develop it. Thank you for your help in creating the plugin for me.
@MrGeneralQ @tcwolf12 @Clasher8 You can create an npc with a custom name and then check when he is right clicked and then make him do whatever : Code: @EventHandler public void VillagerSpawn(CreatureSpawnEvent e) { if(e.getEntity().getType() == EntityType.VILLAGER) { Villager v = (Villager) e.getEntity(); v.setAdult(); v.setAgeLock(true); v.setCanPickupItems(false); v.setCustomName(ChatColor.DARK_AQUA + "" + ChatColor.BOLD + "Delivery Man"); v.setCustomNameVisible(true); v.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 99999999, 127)); v.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 99999999, 127)); v.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 99999999, 127)); } } @EventHandler public void EntityRightClick(PlayerInteractEntityEvent e) { Player p = e.getPlayer(); Entity vil = e.getRightClicked(); if(e.getRightClicked().getType() == EntityType.VILLAGER) { if(vil.getCustomName() == ChatColor.DARK_AQUA + "" + ChatColor.BOLD + "Delivery Man" ) { //Code for what you want him to do (Probably open an inventory with the item ordered ? ) } } } } @MrGeneralQ You my use this to continue working on the project .. ill try to do it too but i am not going to get too far ... new to bukkit coding.. P.S. : this event triggers when a villager spawns (by an egg or by commands) and you can change the code a bit to make it trigger only when a villager spawns, but on desired locations and not wherever in the world
@mikekats I don't understand Java Coding but I also thank you for helping me by giving @MrGeneralQ a code to finish my plugin request
The chance that I will be able to finnish this project is pretty small. Since the fact that iv'e never used Vault or Make npc's move. Vault shouldn't be that hard, but I don't want to rush and miss anything important in my proces of learning.
If anyone is interested in attempting this in dscript this may help: Code: Inventory Script Name: type: inventory # Must be a valid inventory type. # Valid inventory types: BREWING, CHEST, DISPENSER, ENCHANTING, ENDER_CHEST, HOPPER, PLAYER, WORKBENCH inventory: inventory type # The title can be anything you wish. Use color tags to make colored titles. # Note that titles only work for some inventory types, including CHEST, DISPENSER, FURNACE, ENCHANTING, and HOPPER. title: custom title # The size must be a multiple of 9. It is recommended not to go above 54, as it will not show # correctly when a player looks into it. Tags are allowed for advanced usage. size: 27 # You can use definitions to define items to use in the slots. These are not like normal # script definitions, and do not need %'s around them. definitions: my item: i@item other item: i@item # You can specify the items in the slots of the inventory. For empty spaces, simply put # an empty "slot". Note the quotes around the entire lines. slots: - "[] [] [] [my item] [i@item] [] [other item] [] []" - "[my item] [] [] [] [] [i@item] [i@item] [] []" - "[] [] [] [] [] [] [] [] [other item]" More docs can be found at mcmonkey.org/denizen/ and https://dev.bukkit.org/bukkit-plugins/denizen/ The use of dscript may significantly decrease the work that you have to put in @MrGeneralQ because at least then you won't have to implement any NPCs on your own. It will also make it possible for @Clasher8 to update it if it breaks because there are plenty of tutorials on YouTube. Best of luck!
Thank you @tcwolf12 for providing a script for @MrGeneralQ I thank everyone for providing scripts and developing the plugin.