title: Java name Objects with a variable name
body: <p>so I am making a plugin for Minecraft. Its basically a team plugin. What I need to do, is be able to create multiple teams, but I cant seem to figure out how to change the object name to the players chosen team name. Here is what I mean:</p>
  
  <pre><code>if (l.equalsIgnoreCase("NewTeam")) {
      teamName= args[0]; // This is the players chosen team name
       Team newTeam = new Team(teamName, sender);
       newTeam.addPlayer(sender);
  </code></pre>
  
  <p>Since this is a server plugin, it will have to deal with multiple teams, which would mean it is creating lots of team objects, but all with the object name newTeam. Does anyone know of a better way that I can do this? Thanks.</p>