Giter Site home page Giter Site logo

mdsimmo / bomberman Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 7.0 3.7 MB

A Minecraft Bukkit plugin recreating Bomberman

Home Page: https://www.spigotmc.org/resources/bomberman.77616/

License: The Unlicense

Java 1.64% Kotlin 98.36%
bomberman bukkit kotlin minecraft minigame spigot

bomberman's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bomberman's Issues

Chained TNT explosions breaks through multiple blocks

Describe the bug
Chained TNT explosions can break multiple blocks at once

To Reproduce
Steps to reproduce the behavior:

  1. Start a game
  2. Have at least 1 gunpowder
  3. Place a tnt onto of another tnt next to a wall
  4. On explosion, flames will pass through the wall

Expected behavior
Chained TNT explosions should stop at the wall

Version infomation

  • Bomberman Version: 0.6.3
  • Server version: MC 1.17.1
  • Installed plugins: -

Command helps reports command as incorrect

What happened?

Typing e.g. /bm stop -? will show "Incorrect command usage".

It will also show the help as asked, but it shouldn't tell me that I typed it wrong.

Console Errors

No response

Bomberman Version

v0.8.3

Minecraft Version

any

Java Version

No response

Installed Plugins

No response

Add better list funtions

Describe the solution you'd like

Add {list|map|function} and {list|join|seperator}

These would replace {list|foreach} and {list|get}. No idea why I added {list|get} in the first place

Describe alternatives you've considered
no

Additional context
none

Make a nicer wiki

What problem does the feature solve
The current wiki is ugly, doesn't support permalinks and sidebar is disorganized, and no good spot to upload images.

Describe the solution you'd like
Build a website (using github pages) that is nice.

Describe alternatives you've considered
Patch the wiki. But most problems cannot be fixed by patching.

Additional context
Inspired by lucky-perms wiki.

Lobbies and Auto Join/Start

What problem does the feature solve

  • Joining a random game cannot be done without command blocks
  • Joining the game with the most players waiting is very difficult
  • Automatically starting a game when enough players have joined requires weird commands in the message.yml file
  • Wait lists are difficult to implement

Describe the solution you'd like
Add lobbies.

Lobbies have a list of possible games (configured by server admins)

Players join the lobby, then, when a game becomes available, players will automatically jump into the game and start playing

Describe alternatives you've considered
Use command blocks to build complex circuits which sense players in games and select the appropriate game. But this complex for server admins, inefficient, cannot be executed by players from a command. It also is highly inflexible once built.

Use the code execution ability of the messaging system to execute code when a player joins a game or attempts to join a game. For instance, create a game called "lobby" with zero spawns. Then alter the "no spawns remaining" message to choose a random game and send the player there. This is an ugly though.

Additional information
Some questions:

  • Can a player directly join a game; or must they first join the lobby? Answer: Must join to the lobby first
  • Can multiple lobbies join to the same game? Answer: no
  • Do players teleport to a lobby and then only teleport to a game when there's enough players.? Answer: No. Teleported immediately
  • If a new player joins a lobby and there's room in a game that counting but not started, does the new player join the counting game immediately? Answer: yes
  • Should there be a count down before teleporting to a game? Answer: No
  • How should players know where they are in the lobby queue? Answer: ?
  • If a player leaves during count down, what happens? Answer: Next player takes their spot. If no next player, countdown cancelled.
  • How to handle games with a different number of spawns? Answer: target game sequentially.
  • When a game ends, do the players go back to the lobby? Answer: No

Start Game Issue

When I start the Bomberman game the glass that surrounds the player to make sure he can't do anything till the game starts (which usually disappears when it does start) is not disappearing. I've tried going into the configs, everything. I have the spawn points set using the sign and it's a custom schematic but the glass won't disappear.
Please help.

Allow console to create a game

What problem does the feature solve
The console is not able to create new games since the /bm create command is required to be run by a player to get a position. It could be useful for the console to create new games to automatically generate a queue of games.

Describe the solution you'd like
Add a -p argument that lets the console specify the position. Then dynamic creation of games will be possible.

Describe alternatives you've considered

  • Add a -t target selector that the console can target a player/entity. This would only mean that in most cases an entity will need to be spawned so it's position can be selected. It may seem to have the advantage that multiple games can be built at once, but ultimately I cannot see how multiple games could be built at once due to what would the games' name must be unique?
  • Add a command similar to Minecraft's /exec, which allows the position to be set.

Additional context

  • One issue with this solution is that it is not possible to use dynamic position, which makes the feature largely useless (unless combined with another plugin that allows dynamic command creation).
  • The game name is also not dynamic, thus, again the feature is largely useless on its own without some sort of dynamic command builder.

Edit game data with commands

What problem does the feature solve
It is not possible to set game data from the console

Describe the solution you'd like
Bring "/bm set" back with full game data support

Describe alternatives you've considered
None

Additional context
It can be done by players and by editing config files. Maybe that's enough?

Player cant build near Owner

Describe the bug
Somehow the player can not build in the Radius of 3 blocks arround an Owner/admin

Version information

  • Bomberman Version: v0.6.5
  • Server version: paper 1.16.5
  • Installed plugins: 33 are to much to write, but important ones: Worldguard, Deluxehub 3

Remove duplication of colour formats through messages.yml

What problem does the feature solve
In messages.yml, every time e.g. a command is written, it is (inconsistently) wrapped in e.g. {gray|{italics|/bm ...}}.

Describe the solution you'd like
Have all commands pass to a custom format like items are. Likewise for names, etc.

Describe alternatives you've considered
None

Additional context
None

You should not be using reflection to add player permission attachments

What code needs changing
In io.github.mdsimmo.bomberman.game.GamePlayer.kt, you have the following code which adds a permission attachment to a player:

// Add a permission group for WorldGuard compatibility (must be done before teleporting)
// Wrap in try loop because it is quite dodgy how other plugins implement
try {
    val playerPermissions = BukkitUtils.getPermissibleBase(player)
    playerPermissions?.addAttachment(plugin, "group.bomberman", true)
} catch (e: Exception) {
    plugin.logger.log(Level.WARNING, "Unable to add permissions", e)
}

This calls io.github.mdsimmo.bomberman.utils.BukkitUtils.kt's getPermissibleBase() function which calls HUMAN_ENTITY_PERMISSIBLE_FIELD which uses reflection. This does not abide by normal plugin coding standards (plugins should not be accessing OBC!), and thus breaks an interaction with one of the plugin APIs that I am maintaining.

What solution would you like
The Player object inherits from Permissible (as shown here at the top under "All Superinterfaces"), meaning you can simply use the following:

player.addAttachment(plugin, "group.bomberman", true)

This avoids the need of:

  • Using reflection to access perm from CraftHumanEntity
  • Accessing the OBC class CraftHumanEntity directly
  • Modifying the perm's access modifiers to be accessible, which is a Java security issue

Thanks in advance!

worldguard support

What problem does the feature solve
A clear and concise description of what the problem is. Ex. "It is difficult for players to ..."

Describe the solution you'd like
one idea is to have support for worldguard / worldguard flags so default players can get access/permission to use the plugin in a spawn area that is used worldguard on the place. when it is in a worldguard area no one can place tnt on it as it using in the game

Describe alternatives you've considered
If any, a clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Optional Damage Sources

What problem does the feature solve
Add ability to damage players through, e.g. mobs, command blocks, falling, swords, etc

Describe the solution you'd like
Currently everything except PLUGIN damage is ignored. Add configuration to so different damage sources are not ignored. Each source should still only cause 1 damage (except command blocks which should be able to do any amount of damage)

Describe alternatives you've considered
none

Additional context

Disconnecting during countdown does not stop countdown

Describe the bug
If a player is removed from a game (either by leaving the area, or disconnecting) during the countdown, the countdown will continue even if no players are left.

To Reproduce
Steps to reproduce the behavior:

  1. Create game
  2. Join game (one player only)
  3. Start game
  4. Disconnect from server while the countdown is active
  5. Rejoin the server
  6. The game will be running with no players it

Expected behavior
If no (or one?) players are left, the game should stop.

Version infomation

  • Bomberman Version: 0.6.1
  • Server version: MC1.17.1
  • Installed plugins: -

Additional/Screenshots
none

Permission problem

I'm trying to get this great event on my server, but on tests, with GroupManager, with bomberman.* and all perms, i still getting no permission

If i remove all, and run only with this plugin and worldedit, i still getting the error

image

No error on console

image

Can you help me?

Add commands to events

What problem does the feature solve
When something happens in Bomberman, it is difficult for server owners to notice the event, so it is hard to implement custom behavior.

Describe the solution you'd like

  • Let server owners add a list of commands to run on each event.
  • Should be specific to each game.
  • Should use the localisation system to build the commands, thus, allowing for complex expressions

Describe alternatives you've considered
Use {#exce|...} in messages. But using #exec is rather insecure and should be disabled.

Add an automatic toggle to disable the dev info command

What code needs changing
The dev command is currently enabled/disabled by toggling line comments in BaseCommand.init.

This requires frequent changes to the file, and I am frequently forgetting to uncomment the line before committing code or releasing a new version.

What solution would you like

Have an option in the config file (e.g. dev.enable-command), that enables the command

Replace the increasingly complex messaging system with a Scheme interpreter

What problem does the feature solve
The localisation system is becoming increasingly more and more complex.
While it is possible to do many cool things with it - we are ultimately just reinventing the wheel (and doing a worse job)
The current syntax for "lambda" functions is ugly and confusing. Ugly example:

command.group.help: |-
      {#|heading|Help: {command|name}}
      {command|children|sort|{!it|name}|filter|{!sender|haspermission|{it|permission}}|map|{!#|map|{it|name}|{#switch|{=|{#len|{it|description}}>40}|1|{#sub|{it|description}|0|40}...|{it|description}}}|join|
      }

Describe the solution you'd like
Allow message to run scheme code.

Be able to replace the above with something like:

command.group.help: |-
      {#scheme|(heading (get command 'name))}
      {#scheme|(??? I need to learn scheme...))}

Describe alternatives you've considered
Add more and more custom functions, until a horrid language is written.

I have noticed that the macro expansion system I've created does look scheme-ish, but with braces instead of parenthesise. Possibly, the all braces could be interpreted as scheme?

Things to think about

  • Syntax for calling scheme?
  • Maybe keep simple functions like the colour functions?
  • How to pass objects
  • Syntax for declaring functions?

Scoreboard/Data commands

What problem does the feature solve
It is not easily possible to get data about a game from command blocks to display, e.g. custom signs/holograms

Describe the solution you'd like
Every game should be have a configurable scoreboard that stores data about a game.

The score board should show data like:

  • Player's health
  • Game info (similar to /bm info)
  • How many hits/kills each player has given/taken

Describe alternatives you've considered
Allow "/bm info" to select individual data, thus, allowing to be used in other commands. However, it will not work well with minecraft command blocks which largely revolve around /scoreboard and /execute for data manipulation.

Break blocks with correct tool

What problem does the feature solve
Let players break specific blocks if they have the correct tool

Describe the solution you'd like

  • Use the CanDestroy tag on items to allow/disallow block destruction.
  • Change should be implemented in GamePlayer::onPlayerBreakBlockWithWrongTool.
  • Need to find a way to hook into the nbt data

Describe alternatives you've considered
Allow all breaking with a tool, but I don't think this gives enough control to map makers

Allow arenas to be shipped with associated config

What problem does the feature solve
If an arena is created that requires a specific config (e.g starting kit, loot drops), then two files are needed to be shipped to distribute the game (both config and schematic). This extra file adds unwanted complexity.

Describe the solution you'd like
Make I to possible to ship config and schematic in a single zip file.

Describe alternatives you've considered

  • Put the schematic inside the config file (eww)

Questions still to answer

  • Does a new game generate a new config, or just link the schematic config Generate new config
  • If linking config files is chosen, we could also have new games linked to the main config instead of copying everything out (that wasn't a question)
  • Can a game overwrite the schematic config? yes
  • How to let users produce a config/schematic zip easily? Just zipping the files won't work since the config won't point to the correct schematic file path It generates by default
  • Does a config/schematic zip contain a full config? What does it default to if not a full config? A full config
  • What directory to store the config/schematic zips? in the game saves folder
  • Need a better name than "config/schematic zip". Just game save will work

Tasks

  • Save all game data in a zip file
  • Add code to automatically update old saves
  • Allow /bm create to copy an existing config
  • Replace built-in schematic with a built-in game save (thus removing the need for default config)
  • Remove default game config from settings

Add ‘hacktoberfest’ tag

We should add the hacktoberfest tag to the repository to increase amount of contributions to the project.

Allow target selectors on commands

What problem does the feature solve
It is not possible to cause another player to join a game with /bm join <game>. This is an important feature for command signs, {#exec|....}, command blocks and console control.

Describe the solution you'd like
Don't know what I want yet. Some possible solutions:

  • Add a flag of (e.g.) -t=<target> to specify which player to affect
  • Add a new command that replicates similar functionality to \minecraft:exec
  • Hook into Brigadier so \minecraft:exec works (is this possible?)

More things to consider

  • What permissions does the command execute under (sender or target)?
  • How to restrict use of command if flags are used?

Additional context

Security vulnerability with `{#exec|...}`

Describe the bug
{#exec|...} is executed as the console. {#exec|...} is also exposed to the PlaceholderAPI. Thus, anyone with access to permissions API is full administrator.

To Reproduce
Steps to reproduce the behavior:

  1. Install Bomberman
  2. Install PlaceholderAPI
  3. Install a plugin that uses PlaceholderAPI (e.g. Holographic displays)
  4. Give a user permissions to edit Holographic displays
  5. User can now do anything, e.g., %bomberman_msg_{#exec|op mdsimmo}%

Expected behavior
PlaceholderAPI should not have access to {#exec|...}. It should only be accessible by editing the messages.yml

Really, exec should exist at all and command-events (#18) is a much better solution. But for time being, probably good to restrict usage.

Version infomation

  • Bomberman Version: 0.6.3
  • Server version: MC 1.17.1
  • Installed plugins: -

Additional/Screenshots

Add missing configuration documentation

What problem does the feature solve
Documentation on the following features is lacking:

  • How to use bm configure
  • All bomberman players have bmplayer nbt tag
  • Tools can be configured to break specific blocks
  • Blocks can be configured to be only placed on certain blocks

Describe the solution you'd like

Document it!

Describe alternatives you've considered

Ignore the problem and let users be confused

undo place of the bomberman part

What problem does the feature solve
no undo when the bomberman building is placed wrong place

Describe the solution you'd like
undo place of the bomberman part when it is placed fail

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

Remove empty string check in messages.yml for format.message

What happened?

From default_messages.yml:

format:
  # How a basic message looks
  # TODO remove need for empty message check
  # {message}: the message being sent
  message: '{#switch|{message}|||{#green|[Bomberman]} {message}}'

Console Errors

No response

Bomberman Version

v0.8.3

Minecraft Version

Java Version

Installed Plugins

No response

Players can start a game with no players

Describe the bug
Having a game with no players means the game will continue on forever, until it is manually stopped. This is not good if players have access to /bm start but not /bm stop.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a game
  2. Type /bm start <name>
  3. Game is now permanently running until intervention

Expected behaviour
/bm start should return an error if the game has no players.

Version information

  • Bomberman Version: 0.6.4
  • Server version: MC1.17.1
  • Installed plugins: -

Additional/Screenshots

Allow context to be captured in evaluated expressions

What problem does the feature solve
Consider this expression:
{list|filter|{!context|{it}}|...}

For each element in list, I want to pass the element to some object context.

Currently this is not possible

Describe the solution you'd like
Let context arguments be passed through lazy expanded arguments (or maybe just lists?)

Describe alternatives you've considered
Chuck this messaging system out and write a better language

Additional context
Needed for Issue #32

Players receive help for commands they don't have access to

Describe the bug
Requesting help for a group command will show all commands, regardless if the receiver is able to run those commands.

To Reproduce
Steps to reproduce the behaviour:

  1. De-op a player
  2. Get the player to run /bm -?
  3. Help for commands such as /bm create will be shown

Expected behaviour
Commands that the player does not have permission for should not be shown

Version information

  • Bomberman Version: 0.7.1
  • Server version: any
  • Installed plugins: -

Additional
The help for target select flags on /bm join and /bm leave are also always displayed

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.