Code Monkey home page Code Monkey logo

secondchance's People

Contributors

lesserhydra avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

secondchance's Issues

Safe location is not given to online players on reload

Description:

When the plugin/server is reloaded, the online players are not given a safe location in the metadata. This causes deathpoints to fail to create if the players in question don't move through a "safe" position.

Note that this should never occur during normal server operation.

Reproduction:

/gamemode 1
Jump in lava
/reload
/gamemode 0

Expected:

A deathpoint should be created.

Actual:

A NPE occurs, and the items die in a fire.

Deathpoint spawned over edge

Description

When a player sneaks on the edge of a block, the location over the edge is marked safe.

Reproduction

Tower a couple blocks into the air
Sneak on the very edge of the block
/kill

Expected

Deathpoint should be over the top block

Actual

Deathpoint is off to the side, over air

Add sounds

Sounds could help give deathpoints that "finished" feel that they're currently missing. Everything would be configurable, of course.

Some ideas:

  • Created (Direct?)
  • Forgotten (Direct?)
  • Interaction
  • Closing

Residual hitbox on save in Bukkit 1.10

It seems something's changed in 1.10 that's causing armorstands to get left behind on world save again. What's odd is that it's happening in what should be unloaded chunks. Seems to be happening when attempting to respawn hitboxes in loaded chunks.

After further testing, it seems the Chunk.isLoaded() method is bugged in the current Bukkit(Spigot?) version.

Improve hitbox system

The hitbox system needs to be improved. Ideally, hitboxes will be client-side only, so that the plugin doesn't have to worry about removing them before unloads, reloads, shut-downs, and crashes. This will also allow deathpoints to be shown on a per-player basis.

Clean up current tests

Now that I've messed with unit tests a bit, I should be able to do things much more elegantly.

Minor admin commands

  • List all deathpoints
  • Open deathpoint (Without breaking on close!)
  • Break deathpoint

Bukkit 1.8 support

I originally planned on supporting Bukkit 1.8, but I've since realized how difficult this is in execution. 1.9 introduced the particle api (obviously used for particle effects) and the attribute api (used to mark armorstands for deletion in case they get saved to the world file), as well as the ability to play a sound via Strings (instead of the Sound enumeration).

While it is certainly possible to get the plugin working in 1.8, the difficulty lies in making it work elegantly and without adversely effecting the post-1.9 version. It seems my choices are as follows:

  1. Make the plugin dependent on the version of Bukkit
  2. Use interfaces to have a single plugin version decide whether to use 1.8 compatibility
  3. Make a separate version for 1.8

The first option is certainly out; SecondChance is designed to work with any version post-1.9, and there's no way I'm going to start using unchecked reflection. The second option could be viable, but it'd add unnecessary bulk to the post-1.9 version. Separate versions seem to be the best way to go, but that begs the question: how do I build multiple versions from a single codebase?

This requires more research.

Peek subcommand

Should allow an op to see the contents of a deathpoint without breaking it.

Add messages

Add a message that shows on death and when a deathpoint is forgotten. These need to be configurable (using special tags) and optional.

Exp still gets stored when keepInventory is true

Description:

Experience points still get stored in a deathpoint when the gamerule keepInventory is set to true.

Reproduction:

/gamerule keepInventory true
/xp 10L
/kill

Expected:

No deathpoint should be created.

Actual:

A deathpoint with 10 levels worth of experience is created, and the player looses nothing.

Hitboxes don't despawn on server restart?

It seems that the armorstand hitboxes might be getting saved to the world right before the plugin is unloaded. This might be fixable by despawning hitboxes on world unload, instead of waiting for the plugin to unload. Perhaps the hitboxes should also be despawned before every save as well?

Thankfully, the safety net implemented in 0.6 can handle the leftovers in the meantime.

When riding a horse, location is not considered safe

Description

A player's location in not considered "safe" when riding a horse, or anything else for that matter.

Reproduction

Stand on an obvious block
Mount a horse without moving from the block
Ride a ways away, and stop in the open
/kill

Expected

Deathpoint should show up where the player was on death

Actual

Deathpoint is created over the original block

Implement configuration updating

In order to make changes to the configuration, I need a light system for updating old configs without any effort on the part of the user.

Experience calculation inaccuracy

Description:

The stored experience points are sometimes off ever so slightly when dealing with high levels.

Reproduction:

/xp 100L
/kill
Open deathpoint and collect exp

Expected:

You should get 100 levels back exactly.

Actual:

You get 99 levels and the experience bar is barely short of full. Typically, "/xp 1" (For 1 exp, not level) will finish it off.

Write extensive tests

Some ideas:

  • Working with disabled worlds
  • Task canceling on disable
  • Permissions
  • Hitbox fallback attribute
  • Deathpoint invalidation/removal
  • Configuration keys? (make sure default config keys match lookup keys; possible?)
  • Hitboxes de/respawned on world save
  • Save on world save and deinit
  • Config options (all the things)

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.