Package de.codolith.Cinema

Examples of de.codolith.Cinema.CinemaPlayer


 
  @Override
  public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    if(args.length == 1){
      if(cinema.containsPlayer(args[0])){
        CinemaPlayer cp = cinema.getPlayer(args[0]);
        cp.stop();
        cinema.removePlayer(cp);
        sender.sendMessage("Player \""+args[0]+"\" stopped");
        return true;
      }else{
        sender.sendMessage("Player \""+args[0]+"\" doesn't exist");
View Full Code Here


 
  @Override
  public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    if(args.length == 1){
      if(cinema.containsPlayer(args[0])){
        CinemaPlayer cp = cinema.getPlayer(args[0]);
        cp.pause();
        sender.sendMessage("Player \""+args[0]+"\" paused");
        return true;
      }else{
        sender.sendMessage("Player \""+args[0]+"\" doesn't exist");
        return true;
View Full Code Here

        }catch(IOException e){
          sender.sendMessage("Error opening animation \""+args[1]+"\"");
          e.printStackTrace();
          return true;
        }
        cinema.addPlayer(new CinemaPlayer(cinema, id, cinemaFile, frameDuration, playCount,location));
        return true;
      }else{
        sender.sendMessage("Player id already in use");
        return true;
      }
View Full Code Here

        }catch(IOException e){
          sender.sendMessage("Error opening animation \""+args[1]+"\"");
          e.printStackTrace();
          return true;
        }
        cinema.addPlayer(new CinemaPlayer(cinema, args[0], cinemaFile, frameDuration, playCount,cinema.getRegion().getPos1()));
        return true;
      }else{
        sender.sendMessage("Player id already in use");
        return true;
      }
View Full Code Here

    {
      for (int i = 0; i < args.length; i++)
      {
        if (cinema.containsPlayer(args[i]))
        {
          CinemaPlayer cp = cinema.getPlayer(args[i]);
          cp.play();
          sender.sendMessage("Player \"" + args[i] + "\" resumed");
        }
        else
        {
          sender.sendMessage("Player \"" + args[i] + "\" doesn't exist");
View Full Code Here

 
  @Override
  public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    if(args.length == 2){
      if(cinema.containsPlayer(args[0])){
        CinemaPlayer cp = cinema.getPlayer(args[0]);
        if(!cp.isPaused()){
          sender.sendMessage("The given player has to be paused for this!");
          return true;
        }
        int count=0;
        try{
          count = Integer.parseInt(args[1]);
        }catch(NumberFormatException nfe){
          sender.sendMessage("Invalid value for parameter \"count\"");
          return true;
        }
        cp.alterCurrentFrame(count);
        cp.drawCurrentFrame();
        sender.sendMessage("Stepped "+count);
        return true;
      }else{
        sender.sendMessage("Player \""+args[0]+"\" doesn't exist");
        return true;
View Full Code Here

TOP

Related Classes of de.codolith.Cinema.CinemaPlayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.