The pee plugin :D

Discussion in 'Archived: Plugin Requests' started by fiesty, Jan 22, 2013.

  1. Offline

    gamalamin1

    can you make it so they wont take a piss at spawn/safezone or in worldgaurd protected regions :)
     
  2. Offline

    Ne0nx3r0

    You know... With metadata you could mark that it's a pee block so it could be treated differently. For example you could save the name of the person who peed it, and then when others click on it they could get a message that says "This is <username>'s pee"
     
  3. Offline

    penguinben

    Does anyone more experienced have time for this? Because of other things I don't have sufficient time to offer to this plugin at the moment, and I fear I would not do it justice. I will try to do it in my spare time, but I don't have much for now, hopefully it will soon change

    Ne0nx3r0 I was thinking of having the block remove after a certain amount of time, so that you don't just walk into a pee field, and also so make it so that players couldn't pick them up :) but I like the sound of that ^^


    Regards,
    Ben
     
  4. Offline

    Pindagus

    Hi guys,
    I am new to making plugins and found this a good opportunity to learn some basics.

    I named the plugin "PeePoo" and this is what I have right now:
    - /pee Makes players pee (Places yellow wool under them)
    - /poo Makes players poo (Places brown wool under them)
    - peepoo.pee Allows players to pee
    - peepoo.poo Allows players to poo
    - Old blocks return in 10 seconds
    - When you try to peepoo on another peepoo block you'll get a message: <Player> already did a peepee/poopoo here

    What I want to add:
    - PeePoo on a chest or something similar will get the contents deleted. So a peepoo item blacklist would do?
    - PeePoo can't be broken and picked up.
    - Clicking on a block also dislplays who peepoo'ed there

    I could not imagine my first plugin would be something like this :eek:
     
  5. Offline

    fiesty

  6. Offline

    Pindagus

    I sent a link to you. I didn't post it here yet, because I'm not sure if it will break anything...
     
  7. Offline

    fiesty

    Okay I will set the status to resolved

    Pindagus hey could you put this plugin in the plugin submissions forum please also include my server ip?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  8. Offline

    Pindagus

    fiesty Sorry, but I am not going to advertise your server in a plugin submission forum. I'll give you credits instead.
     
  9. Offline

    3DDarren

    It says the project has been deleted :confused:
     
  10. Offline

    boynedmaster

    This whole fucking site is on drugs
     
  11. Offline

    Tiel

    Rich coming from a brony.
     
    calebbfmv likes this.
  12. Offline

    XboxEnforcer

    I don't know what you mean by sending client-side messages, but you cannot send a message to the client from the server unless it is a chat event.
     
  13. Offline

    RiotShielder

    What's wrong with being a brony >.>
     
  14. Offline

    gamalamin1

    Can I get credit for the poo part? Lol
    Can you also make it announce when a player poops/pees? ;)
    Heres proof:
     
  15. Offline

    fiesty

    Okay guys heres the plugin!
     
  16. Offline

    gamalamin1

    it needs to be approved by the bukkit team, do not download it guys, might be a virus plugin!
     
    Deleted user likes this.
  17. Offline

    owenftw

    lol great plugin! I must have this
     
  18. Offline

    Pindagus

    I never said you could post it here, but since you did I want to make clear that this plugin is just experimental and may not be perfect and could break things. (I assume it will not break anything, but you never know..)

    I tried to get it approved, but they found it an inappropriate plugin.
     
  19. Offline

    RiotShielder

    Not like it's a cocaine plugin... It's about natural human activities.
     
  20. Offline

    xMinecraft

  21. Offline

    lucas200206

    I need to pee right now O_O
    anyways, I <3 RAND0M PLUGINS!
     
  22. Offline

    gamalamin1

    Its not inappropriate, its just different! Maybe change the name to RealCraft and say that the plugin makes ingame Minecraft more realistic! Then they will /approve!
     
  23. Offline

    lucas200206

    /approve . LOL But if the name would be RealCraft, then will be need to add some other features, like puke.

    ADD PUKE
     
  24. Offline

    fiesty

  25. Offline

    Pindagus

    Hmm... Maybe it was just the name 'PeePoo'
     
  26. Offline

    gamalamin1

    Yeah, most likely, lol
     
  27. Offline

    tyzoid

    I've reviewed it. While I am not a bukkitdev staff, I believe I have sufficient knowledge of java and plugin development to review it.

    This contains no op-exploits/viruses.
     
    gamalamin1 and Deleted user like this.
  28. Offline

    Snowybearr

  29. Offline

    XboxEnforcer

    It looks legit...

    Code:java
    1.  
    2. package me.pindagus.plugins.peepoo;
    3.  
    4. import java.io.PrintStream;
    5. import java.util.HashMap;
    6. import java.util.LinkedList;
    7. import java.util.Map;
    8. import org.bukkit.ChatColor;
    9. import org.bukkit.Server;
    10. import org.bukkit.block.BlockState;
    11. import org.bukkit.command.Command;
    12. import org.bukkit.command.CommandSender;
    13. import org.bukkit.entity.Player;
    14. import org.bukkit.event.Listener;
    15. import org.bukkit.plugin.PluginManager;
    16. import org.bukkit.plugin.java.JavaPlugin;
    17. import org.bukkit.scheduler.BukkitScheduler;
    18.  
    19. public class PeePoo extends JavaPlugin
    20. implements Listener
    21. {
    22. private PeePooListener peepooListener = new PeePooListener(this);
    23. private Map<Player, LinkedList<BlockState>> blocks = new HashMap();
    24.  
    25. public void onDisable()
    26. {
    27. System.out.println(this + " is disabled.");
    28. }
    29.  
    30. public void onEnable()
    31. {
    32. getServer().getPluginManager().registerEvents(this, this);
    33. }
    34.  
    35. public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
    36. {
    37. if ((command.getName().equalsIgnoreCase("pee")) || (command.getName().equalsIgnoreCase("poo")))
    38. {
    39. if ((sender instanceof Player))
    40. {
    41. if (args.length == 0)
    42. {
    43. Player player = (Player)sender;
    44. this.peepooListener.setPeePoo(player, command.getName());
    45. return true;
    46. }
    47. if (args.length > 0)
    48. {
    49. sender.sendMessage(ChatColor.RED + "This command cannot be used with arguments!");
    50. return true;
    51. }
    52. }
    53. else
    54. {
    55. System.out.println("This command can only be used by players!");
    56. return true;
    57. }
    58. }
    59. return false;
    60. }
    61.  
    62. public LinkedList<BlockState> getBlockList(Player player)
    63. {
    64. LinkedList result = (LinkedList)this.blocks.get(player);
    65.  
    66. if (result == null) {
    67. result = new LinkedList();
    68. this.blocks.put(player, result);
    69. }
    70.  
    71. return result;
    72. }
    73.  
    74. public void saveBlock(Player player, BlockState block)
    75. {
    76. LinkedList list = getBlockList(player);
    77. list.add(block);
    78. }
    79.  
    80. public void restoreBlock(final Player player)
    81. {
    82. final PeePoo plugin = this;
    83.  
    84. Runnable restore = new Runnable()
    85. {
    86. public void run()
    87. {
    88. LinkedList list = PeePoo.this.getBlockList(player);
    89. BlockState old = (BlockState)list.removeFirst();
    90. old.removeMetadata("PeePoo", plugin);
    91. old.removeMetadata("PeePooOwner", plugin);
    92.  
    93. old.update(true);
    94. }
    95. };
    96. getServer().getScheduler().scheduleSyncDelayedTask(this, restore, 200L);
    97. }
    98. }
    99.  
     
    gamalamin1 likes this.
  30. Offline

    45zeldafan

    Ok, I can see where this plugin is going to end up as ;)
     
    gamalamin1 likes this.

Share This Page