GithubHelp home page GithubHelp logo

httprafa / creeper-recover Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 343 KB

Recovers all destroyed blocks by Creeper or other Entities

License: MIT License

Java 100.00%
bukkit-plugin creeper minecraft

creeper-recover's Introduction

CreeperRecover

Recovers all destroyed blocks by Creeper or other Entities

Images

Example 1

Commands

Command 1 Command 2

Config

{
  "configVersion": 2,
  "plugin": {
    "bStats": true,
    "ignoreUpdates": false
  },
  "recover": {
    "recoverSpeed": 3,
    "recoverDelay": 100,
    "blockRecoverSound": "BLOCK_ROOTED_DIRT_PLACE",
    "blockBlacklist": []
  },
  "target": [
    {
      "type": "WORLD",
      "ignore": true,
      "whitelist": [],
      "blacklist": []
    },
    {
      "type": "ENTITY",
      "ignore": true,
      "entityTypes": [
        "CREEPER",
        "PRIMED_TNT"
      ]
    },
    {
      "type": "HEIGHT_RANGE",
      "ignore": true,
      "from": -64,
      "to": 320
    },
    {
      "type": "HEIGHT_FIXED",
      "ignore": true,
      "fixed": 32
    }
  ]
}

Options

configVersion: Is set to the current config version.
bStats: Whether bStats is enabled or disabled. To support me please leave it active.
ignoreUpdates: If you don't want to receive a message in the console when the plugin has a update.
recoverSpeed: The time in milliseconds between each block that is being recovered.
recoverDelay: The time in milliseconds to wait before starting the recovery
blockRecoverSound: Is the sound played when the plugin places a block.
blockBlacklist: Blocks in this list are ignored by the plugin. 
target: In the list, rules are specified where the plugin should take effect.

all: If "all" is set to true all entities will be affected. So if you want only TNT to be recovered then set "all" to false and define TNT in the entityTypes setting.

Example Entities

CREEPER
PRIMED_TNT
SMALL_FIREBALL
FIREBALL
WITHER_SKULL
DRAGON_FIREBALL

Config Examples[target]

Affect only some worlds

Whitelist: Only affect certain worlds

Blacklist: Affect all world except those in the blacklist

{
      "type": "WORLD",
      "ignore": false,
      "whitelist": [],
      "blacklist": []
}

Affect only TnT and Creepers

{
      "type": "ENTITY",
      "ignore": false,
      "entityTypes": [
        "CREEPER",
        "PRIMED_TNT"
      ]
}

Affect only from Y-0 to Y-320

{
      "type": "HEIGHT_RANGE",
      "ignore": false,
      "from": 0,
      "to": 320
}

Affect only at Y-60

{
      "type": "HEIGHT_FIXED",
      "ignore": false,
      "fixed": 60
}

Pages

creeper-recover's People

Contributors

httprafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

creeper-recover's Issues

duplication problem

so when i was testing the plugin out i tried to blow up a creeper near a redstone machine and half of the stuff got duplicated i hope can be fixed!

because when the creeper explodes it doesnt really destroy stuff like pistons or sticky pistons so they fall to the ground and then when that happens the plugin just rebuilds everything with the item on the ground so now u have 2 instead of 1!

Fence bug

When fences are broken by an explosion, the fences that aren't broken update to be a post and not have the connecting rails across, but when the blocks are placed back it does not update again creating a disjointed look and physical gap.
(Not my image but it hopefully gets the message across)
missingfence

TNT also is rebuilt

I only have CREEPER in my target block but both creeper and tnt are recovered.

{ "configVersion": 1, "plugin": { "bStats": true, "ignoreUpdates": false }, "recover": { "recoverSpeed": 3, "blockRecoverSound": "BLOCK_ROOTED_DIRT_PLACE" }, "target": [ { "type": "ENTITY", "ignore": false, "all": true, "entityTypes": [ "CREEPER" ] }, { "type": "HEIGHT_RANGE", "ignore": false, "from": -64, "to": 320 }, { "type": "HEIGHT_FIXED", "ignore": true, "fixed": 32 } ] }

[Suggestion] Recover Delay

A little delay before the blocks start recovering would be nice, and would make the consequence of getting stuck in a creeper hole a little more meaningful, especially when being swarmed by loads of mobs

Music Disc Bug

When a creeper explodes with a custom music disc in a jukebox. The plugin fails to regenerate the CD. Can you add support for CDs and custom CDs when inside a juke box on explosion.

Plugin not working with 1.21?

I've got the plugin installed on Spigot, and I can trigger fixes manually using /recover fix all, but it doesn't seem like it's recovering automatically after the 100ms.

Edit: I've noticed with testing it will replace lanterns...this is the only item I've found that currently is replaced after destruction.

It's possible I've missed something, but I believe the config out of the box should work for creepers, right?

1.21 Breeze Issue

In 1.21 the Breeze mob Wind Charge and Wind Charge item, when they explode they behave as creeper explosion and break blocks when this plugin is active.

The normal behavior would be to simply interact with redstone and not break any kind of blocks.

My current solution and suggestion for people facing the same issue but want some safety from creeper explosions without deactivating mob griefing is to set the "mobExplosionDropDecay" gamerule to FALSE.
This wont stop be the explosions but will make it so 100% of the exploded blocks will drop as items and you can just place them again!

[Suggestion] Block Blacklist

A list of blocks that will not be destroyed by creepers. For example, creepers could be used to potentially bypass plugins that use sign protections, it would also be useful to enable server operators to patch any potential exploits without needing to wait for a patch

1.20.4 server

hey plugin work fine and all that but idk why im getting this error in my console :

[Sat 19:56:59 WARN  CreeperRecover] Plugin CreeperRecover v1.0.12 generated an exception while executing task 64
java.lang.IllegalStateException: Not a JSON Object: null
    at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:101)
    at CreeperRecover-1.0.12-all.jar//de.rafael.plugins.creeper.recover.utils.config.JsonConfiguration.loadConfig(JsonConfiguration.java:105)
    at CreeperRecover-1.0.12-all.jar//de.rafael.plugins.creeper.recover.stats.PluginStats.save(PluginStats.java:88)
    at CreeperRecover-1.0.12-all.jar//de.rafael.plugins.creeper.recover.stats.PluginStats.tick(PluginStats.java:116)
    at CreeperRecover-1.0.12-all.jar//de.rafael.plugins.creeper.recover.CreeperRecover.lambda$onEnable$3(CreeperRecover.java:142)
    at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101)
    at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)

The frame will fall out

In any of the explosions, the frames fall to the ground. They are not restored during the explosion regeneration process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.