Code Monkey home page Code Monkey logo

minechess's Introduction

minechess's People

Contributors

ajneb97 avatar

Stargazers

Logan avatar Artucuno avatar  avatar Yuri avatar  avatar Suzeanne Speir avatar  avatar Jonathan Narvaez avatar

Watchers

James Cloos avatar  avatar

minechess's Issues

Loss of experience

Hi,
At the start of a game, players' exp/levels are set to 0 and do not get restored at the end of the game. For a survival server, this creates a huge issue of players losing progress if they play the minigame. Is this a bug or intended design?
(1.20.4, Spigot)
Thanks

Pause during the game

Hello, I have a small request.
The idea is to create a break system if players logout off during a game, or e.g. kicks them from the server due to a connection outage.

The pause would last several dozen seconds (To be set in the config). During this period, the game would be temporarily stopped until the player reconnects to the server and the game. If a player disconnects again, the timer would start counting from where he last stopped counting in that match. If the timer runs out, the player will be kicked out of the game and lose. In this way, a temporary lack of internet will not cause problems during the game. This would be important for organizing chess tournaments.

Any chance to add this feature?

sign editing while joining the arena

Hello - I have server on 1.20.1 version and 1.15.1 MineChess

I have 2 arenas for Chess minigame - and 1 joining sign for each

1 of the signs works properly
but the second one starts being edited (because of the new 1.20+ mechanic to edit placed signs)

I don't know why one sign works proeprly but the other does not...
My arena's names are:
"szachownica1" (works good)
and
"szachownica2" (starts being edited as a sign)

My signs:
https://imgur.com/a/MIL4weG
example of coding sing:
https://imgur.com/xammNge

How it looks when you press the broken sign:
https://imgur.com/RhEOAu6
Console warn while clicking the broken sign:
[05:26:52 WARN]: Player tester321 just tried to change non-editable sign

Plugin teleports the player correctly and starts the game correctly but the editing sign annoys the players

Chess is not working after restart of the server

Everything worked fine when I set up the arena for the first time. However, after the server restart when I try to join an arena it drops an error, and the chess game won't start. Here are some screenshots.
(I use the 1.18.2 version - Purpur)

Screenshot 2022-04-11 192503

Screenshot 2022-04-11 192542

Players can't 'leave' if the arena is waiting other player to join.

This log happened after using the exit door in the inventory, the player was in a 'waiting arena', his items just vanished.

[19:58:11] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to MineChess v1.13.2
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:505) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:472) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:468) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1589) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.network.protocol.game.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:28) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.network.protocol.game.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:151) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.c(SourceFile:23) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1158) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:1) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandler.y(SourceFile:125) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1137) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1130) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:134) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1114) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1038) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()" because "in" is null
at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838) ~[?:?]
at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
at java.lang.Double.valueOf(Double.java:614) ~[?:?]
at mc.ajneb97.managers.PartidaManager.jugadorSale(PartidaManager.java:165) ~[?:?]
at mc.ajneb97.managers.PartidaListener.clickearItemSalir(PartidaListener.java:123) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor160.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
... 23 more

I tried '/chess leave' (hoping to recreate the bug) beeing in a arena waiting for other player to join. Unfortunatly all items in my inventory are gone and this happens on log:

[19:53:09] [Server thread/INFO]: ****** issued server command: /chess leave
[19:53:09] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'chess' in plugin MineChess v1.13.2
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:829) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1941) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1780) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1761) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:151) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.c(SourceFile:23) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1158) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:1) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandler.y(SourceFile:125) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1137) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1130) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:134) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1114) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1038) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3443-Spigot-699290c-2c1e499]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()" because "in" is null
at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838) ~[?:?]
at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
at java.lang.Double.valueOf(Double.java:614) ~[?:?]
at mc.ajneb97.managers.PartidaManager.jugadorSale(PartidaManager.java:165) ~[?:?]
at mc.ajneb97.Comando.onCommand(Comando.java:213) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
... 21 more

Illegal move while castling

It is possible to put the king in an illegal move while castling.
By chess rules, the king is not allowed to castle if by doing so he is put in danger, however the plugin allows it.

How to replicate:
Set it up so when the king tries to castle, the position he will be after he castles is in sight of an enemy piece. The plugin will allow it, even though this is an illegal move in chess

SQL - No operations allowed after connection closed.

Hey, I just randomly started receiving this error

[16:00:34 WARN]: java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.
[16:00:34 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:73)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1645)
[16:00:34 WARN]:        at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1559)
[16:00:34 WARN]:        at MineChess.jar//mc.ajneb97.mysql.MySQL$1.run(MySQL.java:72)
[16:00:34 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101)
[16:00:34 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[16:00:34 WARN]:        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[16:00:34 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:00:34 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:00:34 WARN]:        at java.base/java.lang.Thread.run(Thread.java:833)

Maven or gradle

Can you add maven or gradle files to this repo?

I need this, for easiest build plugin from source.

Can't fly after joining arena

When i join an arena then i can't fly. I know that this is because the arena is in another world than the lobby because when i went to the arena world and then joined the arena i was able to fly. And i have a feeling i know what the problem is: When im right then you are using this code to let the player join your arena:

https://management.azrasoul.de/s/k7QLS5KAgNGfRQf

You first set the player flying and then teleport the player to the arena. Since 1.18 this doesn't work because minecraft disables the flight on any world change.

Because of that i would be really happy if you could change this so the player is first teleported to the arena and then set to flight.

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.