Quidditch plugin
Quidditch
This plugin was made after a request, found here. It basically adds Quidditch to minecraft.
Rewrite
Starting with the holidays I though of some things to do. Quidditch came to my mind. I hadn't updated it in a while and it wasn't quite working. So I looked at the code and after a brief moment of disgust decided to rewrite it. And after reading the "Quidditch Through the Ages" Book from J.K. Rowling I decide to change some things. Some for the better and maybe some for the worse. The code quality of the plugin is still not that high and I will probably look at it with the same feeling of shame next year :). But I think it is certainly more playable now. One problem is however, that testing such a game is quite hard with just one person and one alt. So there may be many bugs I have missed and maybe even more that occur solely with more players. So please report every bug you find and I will hope I will be able to fix it soon!
As of the rewrite it is NO LONGER COMPATIBLE WITH 1.7. This is mainly because I used armorstands.
Function
Brooms
As of now you have no means to fly, so you would need to allow your users to fly or install some kind of broom plugin. I wasn't quite sure if I should try to implement some. I tried to create one about half a year ago, using 4 armorstand, 2 holding sticks and the other holding saplings. It woked quite fine in the end, though it kept bugging behind the player if the speed was too high... . I wasn't able to find a fix to this and there may be none. It would be quite easy to implement even different kinds of brooms using resource packs, which would even be able to fly smoothly at any speed. Problem with that is, that I am absolutly trash when it comes to art tasks like modeling... . So, you could express your ideas in the comment section if you want to.
There are 4 teams, 4 positions and 3 ball types. The teams are - of course - Gryffindor, Slytherin, Hufflepuff and Ravenclaw.
The positions are:
- Seeker
- This person tries to catch the Snitch. If he/she gets it, the game is over.
- Beater
- These 2 persons can hit the bludger, causing them to search another target.
- Chaser
- These 3 people try to get the Quaffle in/to the enemies goal.
- Keeper
- Can pick the quaffle up after a goal was scored, without having to wait.
The balls are:
- Snitch
- This little Flying gold - goldnugget armorstand thing, which sadly bugs a bit due to it being in minecraft, must be caught. If it's caught, the game is over and the team gets 150 points.
- Bludger
- These two? slimes search for targets, fly to them and stack on top. You will get Nausea and will be unable to see in first person or carry the Quaffle.
- Quaffle
- This red wool block can be picked up by Chasers. If you picked it up you an throw it by leftclicking. Having a Bludger on top will remove the Quaffle. The goal with fire particles is the one you need to score in.
Commands
The main command is: /quidditch The other ones are:
Command | Explanation |
---|---|
/quidditch help | This command displays the help. |
/quidditch create | This creates a new arena. It is designed to guide you through the creation process. I have developed the plug-in, I understand the guide. If you don't please let me know. The messages sent are also configurable in the language.yml |
/quidditch list | This lists all loaded arenas. |
/quidditch sign <create / delete / lookup / list> [arena] [x] [y] [z] [world] | This lets you A: create a sign for a specific arena, or B: delete the sign you are looking at, or C: lookup if the sign you are looking at is a ArenaSign, or D: Display the number of signs in an arena. The last 4 arguments are only needed if you execute the command from the console. |
/quidditch delete <arena> | This deletes the arena permanently. |
/quidditch join <arena> [PlayingClass] [School] | This lets you join an arena. The last 2 arguments are only needed if you have "JOIN_ARENA_USE_GUI" set to false in the config.yml |
/quidditch leave | This lets you leave the arena you are currently in. |
/quidditch info <arena> | This displays information about the arena. Looks nice on console, terrible ingame. Can't easily be formatted nice, since the resource packs handle the character width differently and TAB is not valid |
/quidditch stop <arena> | This stops the queue/game currently running in the arena. |
/quidditch reload | This reloads the language and config files. |
Permissions
Command | Permission |
---|---|
help | quidditch.CommandHelp |
create | quidditch.CommandCreate |
delete | quidditch.CommandDelete |
info | quidditch.CommandInfo |
join | quidditch.CommandJoin |
leave | quidditch.CommandLeave |
List | quidditch.CommandListArena |
Reload | quidditch.CommandReload |
Sign | quidditch.CommandSign |
Sign List | quidditch.CommandSign.list |
Sign Create | quidditch.CommandSign.create |
Sign Delete | quidditch.CommandSign.delete |
Sign Lookup | quidditch.CommandSign.lookup |
Stop | quidditch.CommandStop |
Config
The config has various settings, all should be clear with the help of the comments.
Language
All messages that get send within this plugin are saved in one File. You can adjust everything there. The team names, the end message,... . Placholders, named and explained above the message, get automagically replaced with the right values. Please note: If a message couldn't be found, it will be replaced with "&c&lKey&6 <key name> &c&lNot found!"
Updater
This plugin doesn't use an updater anymore. I will maybe implement one in the future.
Dependencies
None.
Please comment ideas and bugs
Also would love for someone to create a video for this so its more explanatory.
was this error fixed? http://pastebin.com/8twZ31Ym
Also will this plugin technically work with two players to test it?
@Nuklear_Tahqo
Thanks for this too! My chat wasn't getting spammed, but my console. It was a pretty obvious error, but i havn't thought of it happenning. I fixed it, as far as I can tell, I hope the version will be approved soon. For the second one (seconds left): I have just one alt, so I couldn't reproduce it, but it should be fixed now. However, when you disconnect, you will be removed from the game. I can change that, but I think it's ok this way.
@IAlIstannen
Also I started the game with six players, and when it started, we couldn't move. Also if once of the players leave during countdown the chat gets flooded with spam: '10 Seconds Until Game Starts!' until the player rejoins. Same happens for the seconds left broadcast when a player leaves. Thanks :3
I was ill the last 3 days, so I couldn't do anything -.- I will look in the errors and try to fix them ;)
it would if possible be awesome when its bug free to have sign ability added within the plugin like:
[Quad] <Arena Name> <player count>/<max>
This instead of having command override or sign command plugin doing it which doesnt look half as proffesional.
Also apologize for the flood of errors, just not sure where else to send them. Also for the java update I know how to update java in my physical computer but how is this done on your mc hosted server?
new list of errors
11.05 17:16:29 [Server] INFO Vampire: [Vampire]ninja_beast0098, [Vampire]Luna_Lovegood 11.05 17:16:29 [Server] INFO Ravenclaw: [Ravenclaw]Deegs257 11.05 17:16:26 [Server] INFO ... 15 more 11.05 17:16:26 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at com.gmail.ialistannen.quidditch.MainCommand.onCommand(MainCommand.java:157) [?:?] 11.05 17:16:26 [Server] INFO at com.gmail.ialistannen.quidditch.TeamManagement.TeamManager.removePlayer(TeamManager.java:53) [?:?] 11.05 17:16:26 [Server] INFO Caused by: java.lang.NullPointerException 11.05 17:16:26 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.7.0_71] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:710) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_71] 11.05 17:16:26 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_71] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:968) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnection.handleCommand(PlayerConnection.java:1133) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at org.bukkit.craftbukkit.v1_8_R2.CraftServer.dispatchCommand(CraftServer.java:646) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:26 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'quidditch' in plugin Quidditch v1.0 11.05 17:16:26 [Server] ERROR null 11.05 17:16:19 [Server] INFO ... 15 more 11.05 17:16:19 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at com.gmail.ialistannen.quidditch.MainCommand.onCommand(MainCommand.java:157) [?:?] 11.05 17:16:19 [Server] INFO at com.gmail.ialistannen.quidditch.TeamManagement.TeamManager.removePlayer(TeamManager.java:53) [?:?] 11.05 17:16:19 [Server] INFO Caused by: java.lang.NullPointerException 11.05 17:16:19 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.7.0_71] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:554) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.z(MinecraftServer.java:651) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.DedicatedServer.A(DedicatedServer.java:368) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.A(MinecraftServer.java:710) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.SystemUtils.a(SourceFile:60) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_71] 11.05 17:16:19 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_71] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:968) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at net.minecraft.server.v1_8_R2.PlayerConnection.handleCommand(PlayerConnection.java:1133) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at org.bukkit.craftbukkit.v1_8_R2.CraftServer.dispatchCommand(CraftServer.java:646) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 17:16:19 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'quidditch' in plugin Quidditch v1.0 11.05 17:16:19 [Server] ERROR null
@Sean_Amor http://goo.gl/28EYHg
Thank you for the update I am so excited to learn how this all works, My players will love this! also I am not sure how to update the java for my server, any idea?
tutorial video
@Sean_Amor
Yes... I compiled with java 8. But you have 7 or lower :/ It should be safe for you to update to java 8, but i uploaded a java 7 version.
Any idea how to fix this error?
11.05 10:55:04 [Server] INFO ... 6 more 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at java.lang.Class.forName(Class.java:274) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.lang.Class.forName0(Native Method) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.security.AccessController.doPrivileged(Native Method) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.net.URLClassLoader.access$100(URLClassLoader.java:71) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at java.lang.ClassLoader.defineClass1(Native Method) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO Caused by: java.lang.UnsupportedClassVersionError: com/gmail/ialistannen/quidditch/Quidditch : Unsupported major.minor version 52.0 11.05 10:55:04 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.7.0_71] 11.05 10:55:04 [Server] INFO at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:522) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:199) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugins(CraftServer.java:291) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) [spigot-1.8.3.jar:git-Spigot-c136710-0af2738] 11.05 10:55:04 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/gmail/ialistannen/quidditch/Quidditch : Unsupported major.minor version 52.0 11.05 10:55:04 [Server] ERROR Could not load 'plugins/quidditch.jar' in folder 'plugins'