Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Anti Mob plugin.

Comments in 'Plugin Development' started by TheDeibo, May 9, 2015.

  1. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    Here is an idea.
    Sometimes a server will get a player ( be it op or not ) who will spam the server with mobs.... it gets annoying.
    SO...
    my idea is, when the server gets spammed with mobs, a plugin
    ( like LegendOfMCPE's clearlagg. - https://github.com/LegendOfMCPE/ClearLagg )
    will just clear all mobs from the server, and that's a easier way to get rid of them. ( my idea is something like /clearmobs )
    for example:
    if i was to use the command /clearmobs , it would remove ALL mobs on the server, and give a message saying "all mobs removed", or "*number* of mobs has been removed"
    it would work for all worlds, and save staff a lot of time getting rid of them.
    Many thanks,
    The plugin ideas person, ( not a official title )
    TheDeiboKnows,
    TheDeibo.
  2. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Just use ClearLagg, gosh.
    TigerHix likes this.
  3. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    Please open your eyes Gamecrafter, :cool:

    This is ClearLagg description. also i read the other details too... i recommend you doing that before "gosh ".
    ____________________
    ClearLagg was designed to reduce lag on PocketMine-MP servers by removing entities, and preventing it through it's many optional features. Of course this plugin can't fix all lag, but it does clear most of it. If you're using a larger server with 20+ players, simply using the /lagg clear command can drastically decrease RAM/CPU usage by simply removing your configured entities.


    Non of it says GETS RID OF MOBS... gosh.... ;)
  4. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    ClearLagg does clear all mobs. What exactly do you want?
  5. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    ok i looked inside the code, and it seems ur right..... sorry... but i would like to point out, that "gosh" sort of reply was VERY uncalled for, and I felt offended by the LACK of kindness in you sense your last interaction with me - SrverLove plugin. ( and soon after you got banned of pocketmine forum)

    I would also like to point out, that they are loads of duplicate plugins, and plugins based of an idea, so please dont pick on people because of that reason. ( For example, the idea I just had of getting rid of Mobs, its such a good idea that LDX ( who was coding ) and LegendofMCPE (whos plugin is it,) has had the very same idea

    I hope I have explained my point fairly, and I do not wish to offend you ( if i did )
    TheDeibo
    PEMapModder likes this.
  6. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Then you better delete this thread. And please read a plugin's description thoroughly next time. ;)
  7. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    it wasn't in the description
    Code:
    <?php
    namespace ClearLagg;
    use pocketmine\command\Command;
    use pocketmine\command\CommandSender;
    use pocketmine\command\PluginIdentifiableCommand;
    class ClearLaggCommand extends Command implements PluginIdentifiableCommand {
    public $plugin;
    public function __construct(Loader $plugin) {
    parent::__construct("clearlagg", "Clear the lag!", "/clearlagg <check/clear/killmobs/clearall>", ["lagg"]);
    $this->setPermission("clearlagg.command.clearlagg");
    $this->plugin = $plugin;
    }
    public function getPlugin() {
    return $this->plugin;
    
  8. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Mobs ARE entities.
    PEMapModder likes this.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    killmobs in ClearLagg.

    clear in ClearLagg didn't kill mobs.
  10. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    I wasn't rude the way I replied earlyer was I? ( post #5)
  11. TheDiamondYT
    Offline

    TheDiamondYT New Member

    Joined:
    Dec 20, 2014
    Posts:
    44
    Minecraft User:
    TheDiamondYT7
    PHP:
    public function onPlayerInteract(PlayerInteractEvent $e){
    if(
    Code to get carried item == id of spawn egg){
    $e->setCancelled(true);
    $e->getPlayer()->sendMessage("§cYou are not allowed to use that item.");
    } else{
    $e->setCancelled(false);
    }
    }
  12. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    That was totally what I thought...
    BTW, /lagg clearall clears all mobs.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Carried item ≠ carried item's ID
    Legoboy0215 likes this.
  14. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    .-. Suggestions use GrabBag plugin from aliuly... theres command /entities nuke( for mobs ) , /entities nuke all ( including entities)

Share This Page

Advertisement