Tetris
This plugin is a continuation of Streammy's Tetris plugin. Streammy has moved on to bigger and better things, so, with his permission, I've decided to take over development for now so that we can all continue to enjoy Streammy's plugin on our servers.
Features
- Load up tetris at any location (or change settings to limit it to locations)
- Original tetris, blocks are the same.
- Highscores + server-wide anouncements (if configured)
- Various graphical effects (Red-screen of death, startup counter, more are planned)
- Restore support after game-over that supports all blocks
- Permission support
- Plays the original Tetris theme (TM)
- Spectating
- Admin-only areas
Controls
When a player enters the Tetris field, the following blocks appear before him or her:
- Iron, which is used for rotating
- Gold, which is used for horizontal movement
- Diamond, which is used for instant drop Left clicking each of the blocks gives the listed effect.
If you'd like to change these controls, you can do so in the config.
Commands
- /tetris
- Creates a Tetris field the player that use it, or ends the current game immediately if the player is currently in one. Note that the player must be standing on the block MustStandOnBlockType from the config (default: gold block). If CanUseTetrisEverywhere (default: false) is enabled, this requirement is lifted, allowing a user to create a field anywhere. If UseAdminLocation (default: false) is enabled, then the user must be in an admin location created using /tbuild. The user must have the permission tetris.use (which defaults to true for OPs, false for everyone else) in order to use this command, unless the NoPermissions (default: false) configuration option is enabled.
- /highscore
- Lists the current top 5 highscores.
- /tspec
- If Spectate is enabled in the config (default: true), then users will be able to teleport to the lower part of the field in order to spectate a Tetris game in progress by using the command "/tspec PLAYER", where PLAYER is the username of any player who is playing Tetris.
- /tbuild
- If UseAdminLocation (default: false) is enabled, this is the command to be used to define admin locations in which Tetris is allowed to be played.
Donations
If you would like to support the future development of this plugin, a donation would be very much appreciated. If you can also specify a requested feature along with your donation, in which case I'll prioritize adding that feature for the next version.
Did you forget my requests some time ago? :D
I got the same Problem as alvaruss!
@alvarusss That's... interesting. I'll take a look at that by this weekend.
@GamingG
I'm having one problem with plugin. When I'm going into tbuild mode everything's ok but messages appears twice, then when i'm trying to play nothing happens and tetris spams my console. If I will use command /tetris again this appears http://scr.hu/3kn/z5ww1 It seems to happen only on other map than that I used for 1st time. For example if i'll make an arena on map World (that i used for 1st time) everything'll be ok but when i'll try on other map it'd spam my console.
BTW Sorry for my english i hope it is good enough so You'll know what i mean.
Thanks in advance Alvarusss ;)
2013-02-08 15:46:46 [INFO] Alvarusss issued server command: /tetris 2013-02-08 15:46:46 [INFO] [Tetris] Permission: tetris.use 2013-02-08 15:46:46 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'tetris' in plugin Tetris v0.7.3 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186) at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:540) at net.minecraft.server.v1_4_R1.PlayerConnection.handleCommand(PlayerConnection.java:995) at net.minecraft.server.v1_4_R1.PlayerConnection.chat(PlayerConnection.java:911) at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:855) at net.minecraft.server.v1_4_R1.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:290) at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:115) at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39) at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:585) at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224) at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:481) at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:416) at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849) Caused by: java.lang.NullPointerException
@Tsrizchris How many ticks per second is your server running at? If it lags enough to drop below 20 TPS, you'll notice a big difference.
I'm having these weird scenarios where blocks are taking multiple times longer to change than they should. Does this happen for anyone else?
@GamingG
You might want to change the OldBlock.class to make use of Bukkit's BlockState class. The current one is really outdated
@locarnos Users reported this in a previous version, but it has never happened in my test environments ever since I fixed the sign replacement bug. It's possible that something specific to your arena is causing this issue. What old blocks are being replaced in this area?
I have to agree with locarnos, this happened once for me today, though I haven't checked for an error.
[Server] INFO at net.gamesketch.bukkit.tetris.FIELD.OldTerrainData.restore(OldTerrainData.java:40) 06.01
There is a problem with the restoration of the site. Tetris Arena sometimes does not disappears. The problem is rare.
sorry for bad english
@locarnos What did this player have in his or her inventory at the time of logout?
06.01 11:01:54 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 06.01 11:01:54 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 06.01 11:01:54 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 06.01 11:01:54 [Server] INFO at net.gamesketch.bukkit.tetris.LISTENERS.PlayerLeaveListener.onPlayerQuit(PlayerLeaveListener.java:17) 06.01 11:01:54 [Server] INFO at net.gamesketch.bukkit.tetris.PLAYER.LocalPlayer.setGame(LocalPlayer.java:26) 06.01 11:01:54 [Server] INFO at net.gamesketch.bukkit.tetris.GAME.Game.restore(Game.java:60) 06.01 11:01:54 [Server] INFO at net.gamesketch.bukkit.tetris.FIELD.Field.restore(Field.java:21) 06.01 11:01:54 [Server] INFO at net.gamesketch.bukkit.tetris.FIELD.OldTerrainData.restore(OldTerrainData.java:40) 06.01 11:01:54 [Server] INFO at net.gamesketch.bukkit.tetris.FIELD.Oldblock.restore(Oldblock.java:74) 06.01 11:01:54 [Server] INFO at org.bukkit.craftbukkit.v1_4_6.inventory.CraftInventory.setContents(CraftInventory.java:64) 06.01 11:01:54 [Server] INFO Caused by: java.lang.IllegalArgumentException: Invalid inventory size; expected 27 or less 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:427) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:494) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:598) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:295) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:716) 06.01 11:01:54 [Server] INFO at net.minecraft.server.v1_4_6.PlayerList.disconnect(PlayerList.java:206) 06.01 11:01:54 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) 06.01 11:01:54 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) 06.01 11:01:54 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) 06.01 11:01:54 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) 06.01 11:01:54 [Server] INFO org.bukkit.event.EventException 06.01 11:01:54 [Server] SEVERE Could not pass event PlayerQuitEvent to Tetris v0.7.3
@Tsrizchris @locarnos Sorry to keep you guys waiting. Tetris v0.7.3. has been uploaded, and it should be fully compatible with bukkit 1.4.6. Have fun!
Is there any chance you could get it up this week?
@locarnos
I completely agree! Please update it soon!
Please Update for CB 1.4.6. I Love this plugin
@GamingG I ended up closing off the port, waiting for an update before I re-open it.
@Tsrizchris Sorry to keep you waiting, I really am. Have you found any other bugs since then, or have you avoided it since it started acting up for you?
@GamingG
Awesome!! Can't wait!
@Tsrizchris This month has been hectic, my apologies. I have a version ready to release as soon as the replacement CPU fan comes in for my computer. It *should* have a fix for the Tetris pieces not moving properly when the proper block is hit, among other things.