Need plugins (most alreaady devolped)

Discussion in 'Archived: Plugin Requests' started by L0rd_Luke, Jun 10, 2012.

  1. Offline

    L0rd_Luke

    Sweet. Like do it every 30 seconds then at 10 seconds or something like that?

    By the way, which JDE are you using? I just downloaded eclipse.

    I'm going to peace off for the night, see you tomorrow.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  2. Offline

    PhoenixFlight

    I use NetBeans

    getLinePlace:
    description: Returns your place in line.
    usage: /getLinePlace
    permission: gladiator.placeinline
    permission-message: You don't have permission to do that.

    See if that'll do.
     
  3. Offline

    Tezlastorme

    Wow you guys have been busy well here's 3 and 4 (haven't fully tested yet but it should work, I can't really test it without 3 players on my server)

    If I made it two plugins I couldn't access the HashSet from both of them and I need to so when someone dies it randomly selects the next player to play. Also please can I have IP when it's out? I really want to see how it is =P

    Here is the body of my listener class just so you know:
    Code:
    public Main plugin;
     
        public playerListener(Main instance) {
            plugin = instance;
        }
       
       
       
        @EventHandler(priority = EventPriority.NORMAL)
        public void onPlayerDeath(PlayerDeathEvent event) {
           
            Player[] players = Bukkit.getOnlinePlayers();
            Player player = event.getEntity();
           
            Player killer = player.getKiller();
           
                killer.setHealth(killer.getMaxHealth());
                killer.setFoodLevel(20);
                main.inGame.remove(player);
           
            Random random = new Random();
           
            int nextPlayer = random.nextInt(players.length);
           
            if(players[nextPlayer] != player){
                main.inGame.add(players[nextPlayer]);
            }
           
        }
       
        @EventHandler(priority = EventPriority.NORMAL)
        public void onPlayerMove(PlayerMoveEvent event){
            if(!main.inGame.contains(event.getPlayer())){
                Location from=event.getFrom();
                Location to=event.getTo();
                double x=Math.floor(from.getX());
                double z=Math.floor(from.getZ());
                if(Math.floor(to.getX())!=x||Math.floor(to.getZ())!=z){
                    x+=.5;
                    z+=.5;
                    event.getPlayer().teleport(new Location(from.getWorld(),x,from.getY(),z,from.getYaw(),from.getPitch()));
                }
            }
        }
       
        @EventHandler(priority = EventPriority.NORMAL)
        public void onPlayerJoin(PlayerJoinEvent event){
            Player player = event.getPlayer();
            if(main.inGame.size() < 2){
                main.inGame.add(player);
            }
        }
       
        @EventHandler(priority = EventPriority.NORMAL)
        public void onPlayerQuit(PlayerQuitEvent event){
           
            main.inGame.remove(event.getPlayer());
           
        }
    Maybe we should set up a GitHub repo?

    Use PlayerDamageEvent or EntityDamageEvent or whatever it is and if the shooter of the arrow is not in game, cancel the event.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  4. Offline

    PhoenixFlight

    Yeah, I did that.
    Code:
        @EventHandler
        public void onPlayerDamage(EntityDamageByEntityEvent event) {
            if(!(event.getEntity() instanceof Player))
                return;
            if(!(event.getDamager() instanceof Player))
                return;
            Player hit = (Player)event.getEntity();
            Player hitter = (Player)event.getDamager();
            if(!(hit.equals(SpawnHandler.getFirstPlayer()) || hit.equals(SpawnHandler.getSecondPlayer())))
                event.setCancelled(true);
            if(!(hitter.equals(SpawnHandler.getFirstPlayer()) || hitter.equals(SpawnHandler.getSecondPlayer())))
                event.setCancelled(true);
        }
     
  5. Offline

    Tezlastorme

    Awesome! :)

    I'm confused about this place in line thing you're doing. I had it so it selected a random player but should I change that?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  6. Offline

    PhoenixFlight

  7. Offline

    Tezlastorme

    Does that mean the players will take their turns in order? I had it set up so it just picked a random player to unfreeze and the other player would respawn and be frozen.

    You shouldn't have to do the releasing players and stuff I'm doing that bit because that is number 4 which I have done (though I am fixing a bug)

    L0rd_Luke would you prefer the next player to be chosen randomly or would you prefer it to be ordered?

    I guess you could do number 4 if L0rd_Luke would prefer it ordered.

    Just uploaded an update with a bug fixed same link as before.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  8. Offline

    L0rd_Luke

    Phoenix has pretty much made everything i've asked into one plugin, (except number one because i've since realized that comes default with craftbukkit). But i do appreciate what you did, so don't think i'm blowing you off but he pretty much did everything i asked an made it into one plugin. I'll still add you into the credits when i advertise my server, but it's much more efficient to just use his as i don't really need two things doing the same thing as it would just increase server memory use.

    Did you add the thing that prevents shooting? I'm testing it and it's letting me shoot freely into the arena. Also, could you add a command like /Score <player> to see how many times they have won? Maybe add a [playerwins]displayname prefix?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  9. Offline

    Tezlastorme

    That's ok no problem I can understand that. I enjoyed having something to program anyway :)
     
  10. Offline

    L0rd_Luke

    Server should be up within the hour, i'm working on finishing the cells. I'm about ready to post a forum post, it has a link to your bukkit profile along with phoenix's. Thanks for your time and effort though.

    http://www.minecraftforum.net/topic/1283719-125fully-automatic-arenapvp/ LINK

    IP: Gladiator.zapto.org:1337

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  11. Offline

    Tezlastorme

  12. Offline

    L0rd_Luke

    So i put it up, and a few things happened. Us three were in it. When one of us killed eachother, it seems as if the tournament reset. I know i told you to respawn the winner but by "winner" i meant the person who kills everyone(the winner of the tournament), not the winner of a fight. Sorry, i should have been more clear. Also, i think you set the commands so if someone dies they have to be killed by the player in order to go through with the loop. If a player does /suicide, it locks everyone in cells and doesn't release anyone. Thanks.
    I was thinking something like
    Code:
    if players.fighting() < 1 then
        player.one() unfreeze
        player.two() unfreeze
     
    //i didn't actully know the commands and syntax so i just made it up lol
     
  13. Offline

    Tezlastorme

    Yeah I looked at his code and he teleports the killer back to their spawn
     
  14. Offline

    L0rd_Luke

    I told him to do that, but i meant to teleport the final killer.
     
  15. Offline

    PhoenixFlight

    So, the only issues right now are:
    1. Spectators can still use bows
    2. Death by means other than being killed by the opponent doesn't register
    3. You DONT want a round's victor to be sent back to a spawn point... just the match victor.

    Is that it?
    Also, are there any exceptions being thrown in the console?
     
  16. Offline

    L0rd_Luke

    I don't think there are. Can you add a command to check the records of a player? And yes those are the three issues.
     
  17. Offline

    PhoenixFlight

    If you want to be a total boss, go on my server to help with testing this thing and figuring out exactly why things are borked.
     
  18. Offline

    L0rd_Luke

    On my way

    wheres the new link?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  19. Offline

    PhoenixFlight

  20. Offline

    L0rd_Luke

    try to rejoin?

    /setSpecPoint isn't working

    While you were AFK a few people joined and we did some testing. Here are the errors:
    -People spawning without weapons, normally if they died. This happened: FREQUENTLY
    -Two players spawning into the same cell. This happened: RARELY
    -After winning, health not resetting. This happened: OCCASIONALLY
    I'm going to get off and take a break. Should be on later.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  21. Offline

    PhoenixFlight

    Give it a shot now (github)
     
  22. Offline

    L0rd_Luke

    Can you get on the server to test it with me?
     
  23. Offline

    Tezlastorme

    Nothing happening here? Has this been given up or something?
     

Share This Page