My First Plugin!

Our members and their stories.
Post Reply
Laserhog
Lord!
Lord!
Posts: 152
Joined: 13 Apr 2011, 03:58
Nickname: laserhog
Nation: Mercatorinos
Hometown: Indigo City
Location: Auckland, New Zealand

My First Plugin!

Post by Laserhog »

As a few of you may know i have been working on my very first plugin and it is done!

ServerLogSaver

It's in beta right now so some testing would be required to fine tune it but check it out and tell me what you think!
~Laserhog~
I do things the only way i know how
Difficulty
User avatar
HeinzPeter
World Owner!
World Owner!
Posts: 1611
Joined: 14 Dec 2010, 23:00
Nickname: HeinzPeter
Nation: HP-EMPiRE
Location: NRW, Germany
Contact:

Re: My First Plugin!

Post by HeinzPeter »

Cool idea. But good administrators have their own scripts to cycle the logfile.
I have seen your dev.bukkit page. Nice! I bet people will use it. :-D

I had an error on server startup.
(You should test things on a linux VM or so.)

Code: Select all

2011-09-08 05:43:15 [INFO] [ServerLogSaver] Version 0.1b Is Enabled!
2011-09-08 05:43:15 [SEVERE] java.io.FileNotFoundException: home/private/tools/minecraft/survival/test/server.log (No such file or directory)
2011-09-08 05:43:15 [SEVERE] 	at java.io.FileInputStream.open(Native Method)
2011-09-08 05:43:15 [SEVERE] 	at java.io.FileInputStream.<init>(FileInputStream.java:137)
2011-09-08 05:43:15 [SEVERE] 	at me.laserhog.ServerLogSaver.MonitorLog.CopyMyFile(MonitorLog.java:71)
2011-09-08 05:43:15 [SEVERE] 	at me.laserhog.ServerLogSaver.MonitorLog.mainCollection(MonitorLog.java:51)
2011-09-08 05:43:15 [SEVERE] 	at me.laserhog.ServerLogSaver.MonitorLog.run(MonitorLog.java:24)
2011-09-08 05:43:15 [SEVERE] 	at java.util.TimerThread.mainLoop(Timer.java:534)
2011-09-08 05:43:15 [SEVERE] 	at java.util.TimerThread.run(Timer.java:484)
Enjoy your stay. HPM! GMAP! STATS!
Save the forests! WWF
Our empty YouTube Channel.
Laserhog
Lord!
Lord!
Posts: 152
Joined: 13 Apr 2011, 03:58
Nickname: laserhog
Nation: Mercatorinos
Hometown: Indigo City
Location: Auckland, New Zealand

Re: My First Plugin!

Post by Laserhog »

Well it looks like according to this you don't have a server.log file
:?:

This seems very odd as it works on other servers and i have tested it multiple times, although only on Windows.
You run on Linux?
I do things the only way i know how
Difficulty
kyborek
World Guide!
World Guide!
Posts: 443
Joined: 01 Feb 2011, 22:55
Nickname: kyborek
Nation: HP-EMPiRE
Hometown: The Skytown
Location: Prague
Contact:

Re: My First Plugin!

Post by kyborek »

As far as i know this server runs on linux
Dumb people say what they know, wise people know what they say.
Image
Image
User avatar
HeinzPeter
World Owner!
World Owner!
Posts: 1611
Joined: 14 Dec 2010, 23:00
Nickname: HeinzPeter
Nation: HP-EMPiRE
Location: NRW, Germany
Contact:

Re: My First Plugin!

Post by HeinzPeter »

I really would not have posted that error when i know that there is no server.log.
The test was running on linux. Many other people use to use linux as host.
HeinzPeter wrote:(You should test things on a linux VM or so.)
Guess there is a problem with / and \. Should be /home/private/[...]
java.io.FileNotFoundException: home/private/tools/minecraft/survival/test/server.log (No such file or directory)
Enjoy your stay. HPM! GMAP! STATS!
Save the forests! WWF
Our empty YouTube Channel.
Laserhog
Lord!
Lord!
Posts: 152
Joined: 13 Apr 2011, 03:58
Nickname: laserhog
Nation: Mercatorinos
Hometown: Indigo City
Location: Auckland, New Zealand

Re: My First Plugin!

Post by Laserhog »

I have posted a new version that may possibly fix this.
Or maybe this simply doesn't run on Linux for the time being.
If i could find a Linux VM then i could make one solely for Linux servers.
I do things the only way i know how
Difficulty
User avatar
HeinzPeter
World Owner!
World Owner!
Posts: 1611
Joined: 14 Dec 2010, 23:00
Nickname: HeinzPeter
Nation: HP-EMPiRE
Location: NRW, Germany
Contact:

Re: My First Plugin!

Post by HeinzPeter »

Looks good after the update.
Two suggestions:
- check for 0 byte content
- console notice (optional)

Compressing is much easier on linux.
The binary is already there, or easy to check the existence (/usr/bin/*zip*).
I really have no clue how to use a 'global' binary to compress stuff on windows.
Enjoy your stay. HPM! GMAP! STATS!
Save the forests! WWF
Our empty YouTube Channel.
Laserhog
Lord!
Lord!
Posts: 152
Joined: 13 Apr 2011, 03:58
Nickname: laserhog
Nation: Mercatorinos
Hometown: Indigo City
Location: Auckland, New Zealand

Re: My First Plugin!

Post by Laserhog »

Thanks for the testing! Ill put your suggestions in my To-Do list which is growing very large lol.
I'll also try keep up the Linux support JUST for you xD
I do things the only way i know how
Difficulty
Post Reply