Bukkit Plugins: Querying Server
Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:39 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
It might be easier to read the banned-players.txt file ?
All I could advise it to look at Minequery and try to do something similar.
All I could advise it to look at Minequery and try to do something similar.
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:39 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
It seems like if you have access to the file, you can use something like AJAX to fetch the file from the web page's code. But I guess then the webpage would have to be hosted on the same system the server is on, and you'd probably need the full path to the file on the webpage when it fetches it (which wouldn't make it very useful to a lotta minecraft server). Then probably split the file into substrings if you need an array. Or you can have the plugin to read from the file somehow and insert a value into a database (which then can be remote or local) for each user in the list. But in order to make a plugin that can be queried by a remote server, from what I've heard, you'd have to create a virtual server inside the MC server that can be queried, which just sounds too complicated for me XD
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:39 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:40 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
Well, says there's an error in your plugin judging by the
at me.samzrulez.bukkit.samzrulez.util.QueryServer.<init>(QueryServer.java:22)
at me.samzrulez.bukkit.samzrulez.SamzRulez.<init>(SamzRulez.java:54)
I'm no good at query servers, but might help if ya included the code from the QueryServer class. Maybe just the chunk that code is in at least. I bet the SamzRulez line 54 is just pointing to the QueryServer class.
at me.samzrulez.bukkit.samzrulez.util.QueryServer.<init>(QueryServer.java:22)
at me.samzrulez.bukkit.samzrulez.SamzRulez.<init>(SamzRulez.java:54)
I'm no good at query servers, but might help if ya included the code from the QueryServer class. Maybe just the chunk that code is in at least. I bet the SamzRulez line 54 is just pointing to the QueryServer class.
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:40 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: Bukkit Plugins: Querying Server
Post that error when you can, and the code that makes it, and we'll take a look at itSamzRulez wrote:Hello,
Yh the main class file (SamzRulez.java:54) is just pointing to (QueryServer.java).
I cant show u the code for that cause a while after i post about that error i remove code and start again. Now im getting a different error, but im on my laptop and my pc is when im making it on.
-Samuel
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:41 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:41 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
I was just kidding
I have never used GroupManager, sorry
I have never used GroupManager, sorry
You mean MineBans ? Have a look at the API docs, there is a method you can use.SamzRulez wrote:Also How can I add temporary bans to ur ban plugin?
Re: Bukkit Plugins: Querying Server
I think maybe he was referring to the one you made in the tutorial? O.o Or was that just a kick plugin? .-. Dun remember.
In a plugin I made, I just had to keep a file of users and it would write when a player was banned (UNIX Time stamp, my fave), then it would check the current time stamp against the one in the file, and if the difference is greater than the time specified (also in the file) when the user attempts to log in, then the ban is removed. Being a UNIX time stamp, the ban time would need to be in seconds, but that's no big deal converting to/from seconds even if you want to be able to use minutes or whatever.
In a plugin I made, I just had to keep a file of users and it would write when a player was banned (UNIX Time stamp, my fave), then it would check the current time stamp against the one in the file, and if the difference is greater than the time specified (also in the file) when the user attempts to log in, then the ban is removed. Being a UNIX time stamp, the ban time would need to be in seconds, but that's no big deal converting to/from seconds even if you want to be able to use minutes or whatever.
Re: Bukkit Plugins: Querying Server
Content Deleted
Last edited by Samuel98 on Sun Mar 22, 2015 9:41 pm, edited 1 time in total.
Samuel Carr
Server Developer
W: http://epiccrafts.co.uk
E: [url]mailto://samuel.carr@epiccrafts.co.uk[/url]
Re: Bukkit Plugins: Querying Server
Exactly how I did it toooffluffy wrote:In a plugin I made, I just had to keep a file of users and it would write when a player was banned (UNIX Time stamp, my fave), then it would check the current time stamp against the one in the file, and if the difference is greater than the time specified (also in the file) when the user attempts to log in, then the ban is removed. Being a UNIX time stamp, the ban time would need to be in seconds, but that's no big deal converting to/from seconds even if you want to be able to use minutes or whatever.
This https://github.com/betterphp/MineBans/b ... .java#L109 might be useful.
Re: Bukkit Plugins: Querying Server
Oh, sorry XD I wasn't aware you wrote MineBans O.o This explains a bit to me now.
Re: Bukkit Plugins: Querying Server
I think you were probably rightoffluffy wrote:Oh, sorry XD I wasn't aware you wrote MineBans O.o This explains a bit to me now.