TF2
Team Fortress 2
This plugin can optionally use TagAPI to color name tags.
This plugin does not need an update and will continue to work between Minecraft versions. However, you will need to update TagAPI each Minecraft version, as this plugin won't work if TagAPI isn't working.
Overview
TF2 is a fully functional plugin that allows you to simulate playing Team Fortress 2 from within Minecraft. It is based off of the popular map created by SethBling, only without any redstone required.
Players can click a sign to join a TF2 map, where they will randomly be assigned a team and teleported to their team's lobby. In the lobby, the player can pick a class using buttons, and wait for the game to start. The objective is for blue team to defend their capture points. Red team’s objective is to try and attack / capture blue team’s capture points. There is a time limit to each map, if that time limit is reached, and red team has not captured all of the capture points, then blue team wins. The moment red team captures all of the capture points, red team wins.
Example PHP code to display stats: https://gist.github.com/4490794
Requirements
- TagAPI and WorldEdit must be installed for this plugin to run.
- You will ideally need a TF2 map. We recommend this one, created by SethBling.
Example Gameplay
Features
- Fully automated lobby status wall using signs, displaying time left in the game, points captured, the status of the game, and more.
- Completely automated - players will almost never have to use commands, most everything is done through signs and buttons.
- Players are automatically balanced onto red/blue teams.
- Create custom classes defined in the configuration - players choose their class by using buttons you create and define as class buttons.
- The game lasts up until a timelimit defined by you.
- Your XP bar displays the status of the point being captured, and your level displays the total amount of kills you've made that game.
- AFK players are automatically kicked from the game.
Creating Your First Map & Setup
- Click here for a full tutorial on creating your first map.
- Click here for a quick tutorial on setting up a map. Only use this if you've created a map before and know how to use the commands it outlines.
Permissions
Permission | Description |
---|---|
tf2.create | Allows everything required to setup a map. |
tf2.play | Allows only normal gameplay commands. |
tf2.button.normal | Allows use normal class buttons. |
tf2.button.donator | Allows use donator class buttons. |
Need support?
We need the following things to help you:
- The output of the /tf2 debug command.
- A full startup log (from "Starting Minecraft server version..." to "Done!").
- Any relevant errors. "An internal error occurred" means there's an error waiting in your server log/console.
Commenting below is NOT the fastest way to get support! If you need help, click here to join our IRC channel on esper.net.
@chaseoes k noting happen i put the 1 on the third line for the map id is that right?
@CrazyToyKiller
What's the 1 there for? It should say "map" (no quotes) where the 1 is.
@chaseoes cant get the lobby board to work.
@chaseoes
03.11 23:05:18 [Server] INFO ... 15 more 03.11 23:05:18 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) 03.11 23:05:18 [Server] INFO at me.chaseoes.tf2.commands.CommandManager.onCommand(CommandManager.java:121) 03.11 23:05:18 [Server] INFO at me.chaseoes.tf2.commands.SetCommand.execSetCommand(SetCommand.java:63) 03.11 23:05:18 [Server] INFO at java.lang.Integer.parseInt(Unknown Source) 03.11 23:05:18 [Server] INFO at java.lang.Integer.parseInt(Unknown Source) 03.11 23:05:18 [Server] INFO at java.lang.NumberFormatException.forInputString(Unknown Source) 03.11 23:05:18 [Server] INFO Caused by: java.lang.NumberFormatException: For input string: "A" 03.11 23:05:18 [Server] INFO at net.minecraft.server.ThreadServerApplication.run(SourceFile:818) 03.11 23:05:18 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419) 03.11 23:05:18 [Server] INFO at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:486) 03.11 23:05:18 [Server] INFO at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215) 03.11 23:05:18 [Server] INFO at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:569) 03.11 23:05:18 [Server] INFO at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) 03.11 23:05:18 [Server] INFO at net.minecraft.server.ServerConnection.b(SourceFile:35) 03.11 23:05:18 [Server] INFO at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:111) 03.11 23:05:18 [Server] INFO at net.minecraft.server.NetworkManager.b(NetworkManager.java:282) 03.11 23:05:18 [Server] INFO at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44) 03.11 23:05:18 [Server] INFO at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:806) 03.11 23:05:18 [Server] INFO at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:824) 03.11 23:05:18 [Server] INFO at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:911) 03.11 23:05:18 [Server] INFO at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:504) 03.11 23:05:18 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:185) 03.11 23:05:18 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) 03.11 23:05:18 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'tf2' in plugin TF2 v0.1 03.11 23:05:18 [Server] SEVERE null 03.11 23:02:41 [Server] INFO
@chaseoes
Yup, i followed all the steps perfectly Also, when a player joins it steals their items, i suggest saving their items to a hashmap, and restoring them when they leave.. If you had a source I could do that for you.
@bob7l
Have you made sure you set the global lobby (/tf2 set lobby) and the timelimit for that map? Is the countdown timer defined properly in the configuration?
@mjkaufer
The error looks like your lobbywall isn't set.
Use the sign to join the map, not the command. The command needs fixing either way.
I've set everything up but I can't join games. I have the appropriate perms, etc. When I do /TF2 join [map], it doesn't work. I also get the following error when I do /tf2 leave (although TF2 leave successfully sends me to the lobby).
00:54:27 [INFO] mjkaufer issued server command: /tf2 leave 00:54:27 [SEVERE] java.lang.NullPointerException 00:54:27 [SEVERE] at org.bukkit.craftbukkit.CraftServer.getWorld(CraftServ er.java:796) 00:54:27 [SEVERE] at me.chaseoes.tf2.lobbywall.LobbyWallUtilities.loadSign Location(LobbyWallUtilities.java:35) 00:54:27 [SEVERE] at me.chaseoes.tf2.lobbywall.LobbyWall.update(LobbyWall. java:47) 00:54:27 [SEVERE] at me.chaseoes.tf2.GameUtilities.leaveCurrentGame(GameUt ilities.java:110) 00:54:27 [SEVERE] at me.chaseoes.tf2.commands.LeaveCommand.execLeaveComman d(LeaveCommand.java:31) 00:54:27 [SEVERE] at me.chaseoes.tf2.commands.CommandManager.onCommand(Com mandManager.java:98) 00:54:27 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginComman d.java:44) 00:54:27 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo mmandMap.java:185) 00:54:27 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(Cr aftServer.java:504) 00:54:27 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(N etServerHandler.java:911) 00:54:27 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerH andler.java:824) 00:54:27 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand ler.java:806) 00:54:27 [SEVERE] at net.minecraft.server.Packet3Chat.handle(Packet3Chat.j ava:44) 00:54:27 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager. java:282) 00:54:27 [SEVERE] at net.minecraft.server.NetServerHandler.d(NetServerHand ler.java:111) 00:54:27 [SEVERE] at net.minecraft.server.ServerConnection.b(SourceFile:35 ) 00:54:27 [SEVERE] at net.minecraft.server.DedicatedServerConnection.b(Sour ceFile:30) 00:54:27 [SEVERE] at net.minecraft.server.MinecraftServer.r(MinecraftServe r.java:569) 00:54:27 [SEVERE] at net.minecraft.server.DedicatedServer.r(DedicatedServe r.java:215) 00:54:27 [SEVERE] at net.minecraft.server.MinecraftServer.q(MinecraftServe r.java:486) 00:54:27 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer ver.java:419) 00:54:27 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour ceFile:818)
@chaseoes
When i disable the arena, the players are still considered IN the arena. I cannot remove them either because it froze in the lobby this time :'(
Edit: Found some error codes that i think are effecting the game timer http://pastebin.com/R4vWT9Di
Edit: found out why they're not removed on quit http://pastebin.com/c8eJkEA3
@chaseoes
http://i.imgur.com/79t3c.png
@bob7l
They should be removed when they log out (and should be at the global lobby when they log back in). Any errors when they log out? Any way to reproduce the timer getting stuck?
For now you can use /tf2 win <map> <team> to end a game (or disable the arena).
Other stuff coming, can't do much on the internal errors unless I see the error.
@chaseoes
Turns out i was missing something in the config, after recreating my arena the problem was fixed! :)
Here are new issues:
1. When a player logs out, they are not removed from the arena
2. Sometimes the timer gets stuck, causing the game to never end
Some suggestions:
1. Allow offlinemode servers, disallowing them to use your simple plugin looks bad (my opinion)
2. Add an instant end command, sometimes the game gets stuck
3. Add a returning string for invalid commands
4. Add a help message showing all available commands
5. A few internal errors when performing a certain command, cannot find an error log sorry.
@bob7l
Posting the errors would be great so I can fix them.
The plugin is running fine on SkitScape's server, with no errors and 200 players, so there's not much more testing I can do.
@chaseoes
i've set 20 max players. and I still get that error D: and I made sure I set 20. nvm finally got it to work :D
@chaseoes
NNOOOOOO!!! PLEASE No!!!
@chaseoes
I just think it should of been tested better before release. I'm constantly getting errors
@chaseoes "You have joined a full map" that's what it say's when i do /tf2 blue and the name of the map and i set the player max to.
@superpeanut911
Post them please. :)
If you're having problems with it saying the game is full, have you set the max players?
@bob7l
And this is exactly why I didn't want to release it in the first place. Should I just delete this project?