I'm looking for some assistance with the command block /testfor command.
I'm trying to utilize a command block to verify one of the following Player affiliations / characteristics:
A couple of quick samples of what I've tried with a command block: I've tried multiple, multiple combinations using Group, Group_Name, Suffix, Suffix_Name etc...
testfor @a[r=3,Group=Newbie]
testfor @a[r=3,Suffix=FirstGroup]
1) Group Name
This would be the Essentials/Group Manager Group Name that the Player is currently a member of.
i.e., Newbie.....
2) Group Suffix
i.e., FirstGroup
Any tips or suggestions would be greatly appreciated.
Vanilla commands like /testfor don't work with plugins or mods. In fact for the most part, command blocks in general don't play well with bukkit at all. You'll have to do what you want within the plugin.
I've been hosting and running my own server for quite sometime and I would image like a lot of others, I'm learning a lot from trial and error and researching the web,
I initially started playing around with scoreboard, and found that if I add a "Team" to scoreboard named Newbie, and run the command testfor @a[r=3,Team=Newbie] it works perfectly, so there's no way at all to achieve the same results as I had mentioned above? I'm figuring that it probably has something to do with the coding/scripting integrated in MineCraft itself verses the coding/scripting included in the plugins/addons, can you explain to my why it works for Teams and not for Groups?
I've been hosting and running my own server for quite sometime and I would image like a lot of others, I'm learning a lot from trial and error and researching the web,
I initially started playing around with scoreboard, and found that if I add a "Team" to scoreboard named Newbie, and run the command testfor @a[r=3,Team=Newbie] it works perfectly, so there's no way at all to achieve the same results as I had mentioned above? I'm figuring that it probably has something to do with the coding/scripting integrated in MineCraft itself verses the coding/scripting included in the plugins/addons, can you explain to my why it works for Teams and not for Groups?
I Appreciate your feedback
I'm not sure exactly how the game and plugins are coded, but I can make a few guesses as to how things might work. Keep in mind though they are just guesses, and could be completely wrong.
I'd imagine that when the game receives a command like /testfor @a[r=3,team=Newbie] it looks inside the brackets, and essentially compares all the parameters inside to a list somewhere in the code. If it finds what it's looking for (like team=), it runs code from there. However if you put in something that is not part of this list (like group=), then the game simply ignores it and moves on. This would mean for a plugin to work with vanilla commands, the programmer would have to go in that list in the game's code and add a parameter name. Since plugin programmers don't do this very often (if at all), then you simply can't use their commands in conjunction with vanilla commands like testfor. However since looking for scoreboard teams is already a part of that list that /testfor uses, you can do this at any time you want.
This all being said, if there is any way you can pull a signal when a player joins a group (i.e. if they push a button to join) then you could simply add the player to a scoreboard team as soon as they join the group. Although it's probably just easier to see if the plugins you're using already have a method of doing what you want, so you don't have to mess with all this junk.
Rollback Post to RevisionRollBack
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
I had a really, really bad feeling that the two were not able to communicate with each other without some major plugin coding modifications, but was not one hundred percent certain, but finally after wasting a lot of time and not gaining any ground, I felt that it was time to seek assistance from inside the forum. Great explanation by the way, that's not what I wanted to here, but really needed to, hehehehe, thanks again for your assistance.
I'm not sure exactly how the game and plugins are coded, but I can make a few guesses as to how things might work. Keep in mind though they are just guesses, and could be completely wrong.
I'd imagine that when the game receives a command like /testfor @a[r=3,team=Newbie] it looks inside the brackets, and essentially compares all the parameters inside to a list somewhere in the code. If it finds what it's looking for (like team=), it runs code from there. However if you put in something that is not part of this list (like group=), then the game simply ignores it and moves on. This would mean for a plugin to work with vanilla commands, the programmer would have to go in that list in the game's code and add a parameter name. Since plugin programmers don't do this very often (if at all), then you simply can't use their commands in conjunction with vanilla commands like testfor. However since looking for scoreboard teams is already a part of that list that /testfor uses, you can do this at any time you want.
This all being said, if there is any way you can pull a signal when a player joins a group (i.e. if they push a button to join) then you could simply add the player to a scoreboard team as soon as they join the group. Although it's probably just easier to see if the plugins you're using already have a method of doing what you want, so you don't have to mess with all this junk.
Okay, Jmal116, I decided to re-evaluate my objectives and re-think how to obtain it, ensuring that the Permissions were based on Group Membership and Teams were based on Scoreboard, because you had mentioned that the Plug-Ins would more than likely be the key to linking them together, I decided to take a deep dive into the existing "Plug-Ins" I'm running on my server, and sure enough, you were right, I figured out a way to integrate and link the "Scoreboard Group Membership" with the Essentials/Group Manager Group Membership, which is achieved without ever even touching a command block, very cool.....
My original objective: as a Player advances "X" Amount of Points are gained using MCMMO Plugin" they would advance in Rank/Groups by way of Essentials/Group Manager Plugin, as certain MCMMO scores/points are reached, Players are now automatically removed from their current Scoreboard Team and moved to the next Team, which of course corresponds with Group Membership/Permissions.
My Essentials/Group Manager Groups and my Scoreboard Team match each other in every way, for example if a new Player joins my server they are automatically added to Essentials/Group Manager Group "Novice" and at the same time, they are automatically added to ScoreBoard Team Novice, next Rank/Group would be Apprentice and Scoreboard Team Novice, etc.....
I'm trying to utilize a command block to verify one of the following Player affiliations / characteristics:
A couple of quick samples of what I've tried with a command block: I've tried multiple, multiple combinations using Group, Group_Name, Suffix, Suffix_Name etc...
testfor @a[r=3,Group=Newbie]
testfor @a[r=3,Suffix=FirstGroup]
1) Group Name
This would be the Essentials/Group Manager Group Name that the Player is currently a member of.
i.e., Newbie.....
2) Group Suffix
i.e., FirstGroup
Any tips or suggestions would be greatly appreciated.
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
I've been hosting and running my own server for quite sometime and I would image like a lot of others, I'm learning a lot from trial and error and researching the web,
I initially started playing around with scoreboard, and found that if I add a "Team" to scoreboard named Newbie, and run the command testfor @a[r=3,Team=Newbie] it works perfectly, so there's no way at all to achieve the same results as I had mentioned above? I'm figuring that it probably has something to do with the coding/scripting integrated in MineCraft itself verses the coding/scripting included in the plugins/addons, can you explain to my why it works for Teams and not for Groups?
I Appreciate your feedback
I'm not sure exactly how the game and plugins are coded, but I can make a few guesses as to how things might work. Keep in mind though they are just guesses, and could be completely wrong.
I'd imagine that when the game receives a command like /testfor @a[r=3,team=Newbie] it looks inside the brackets, and essentially compares all the parameters inside to a list somewhere in the code. If it finds what it's looking for (like team=), it runs code from there. However if you put in something that is not part of this list (like group=), then the game simply ignores it and moves on. This would mean for a plugin to work with vanilla commands, the programmer would have to go in that list in the game's code and add a parameter name. Since plugin programmers don't do this very often (if at all), then you simply can't use their commands in conjunction with vanilla commands like testfor. However since looking for scoreboard teams is already a part of that list that /testfor uses, you can do this at any time you want.
This all being said, if there is any way you can pull a signal when a player joins a group (i.e. if they push a button to join) then you could simply add the player to a scoreboard team as soon as they join the group. Although it's probably just easier to see if the plugins you're using already have a method of doing what you want, so you don't have to mess with all this junk.
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
Okay, Jmal116, I decided to re-evaluate my objectives and re-think how to obtain it, ensuring that the Permissions were based on Group Membership and Teams were based on Scoreboard, because you had mentioned that the Plug-Ins would more than likely be the key to linking them together, I decided to take a deep dive into the existing "Plug-Ins" I'm running on my server, and sure enough, you were right, I figured out a way to integrate and link the "Scoreboard Group Membership" with the Essentials/Group Manager Group Membership, which is achieved without ever even touching a command block, very cool.....
My original objective: as a Player advances "X" Amount of Points are gained using MCMMO Plugin" they would advance in Rank/Groups by way of Essentials/Group Manager Plugin, as certain MCMMO scores/points are reached, Players are now automatically removed from their current Scoreboard Team and moved to the next Team, which of course corresponds with Group Membership/Permissions.
My Essentials/Group Manager Groups and my Scoreboard Team match each other in every way, for example if a new Player joins my server they are automatically added to Essentials/Group Manager Group "Novice" and at the same time, they are automatically added to ScoreBoard Team Novice, next Rank/Group would be Apprentice and Scoreboard Team Novice, etc.....
Works perfectly, Thanks again