Minecraft Mods

(My First Plugin)SimpleWebsiteLinkerV2.1~PopReel!~

  • 2,382 views, 1 today
  • 65 downloads, 0 today
  • 17
  • 0
  • 34
SleepyDog's Avatar SleepyDog
Level 37 : Artisan Button Pusher
105
Thanks for the pop reel everyone.
SimpleWebsiteLinker for bukkit servers.

The commands are
/website (Shows the website info)
/donate (Shows the donate info)
/swlreload (Reloads the config (Op or swl.reload))
/swl (Shows version and author info)

Permissions: swl.reload

The confing includes colour and message editing.
To-do List
Add author info.
Add permissions.
Make the reload command op-only.
change the commands to fit the reaction.
add per-link permissions.
give the messages a cleaner look.
make the decor bars changeable.
add a feature to show when an update is ready.
add more link options.
clean up the code.
add option to use welcome message
add option to use donations
add optional message for why you dont accept donations




Config File

# default config.yml
messageFromAuthor:
# Edit the links below to match your server details.
# Don't use '#' in your messages. #
# Don't use ':' in your messages. #
# keep a space between the ':' and the message

websiteMessage: §aCome visit the server website,
website: §awww.theserverwebsite.com/

serverDonations: true #does your server take donations? (true/false)
donationMessage: §aIf you would like to donate visit,
donationLink: §awww.serverdonationlink.com/
useNoDonationsMessage: true #display noDonationsMessage? (true/false)
noDonationMessage: §aSorry we do not accept donations at this time. #This will be displayed if serverDonations = false



useJoinMessage: true #Do you want to send the 'welcomeMessage' to a joining player?
welcomeMessage: §aWelcome to the server, remember to sign up at the website, www.theserverwebsite.com/

reloadMessage: §aConfig Reloaded. #Op Only
noPermissionMessage: §cYou do not have permission to do this.

#copy and paste the '§' + number to colour your messages
## ---------Formating Codes--------------
# §0 Black
# §1 Dark Blue
# §2 Dark Green
# §3 Dark Aqua
# §4 Dark Red
# §5 Dark Purple
# §6 Gold
# §7 Gray
# §8 Dark Gray
# §9 Blue
# §a Green
# §b Aqua
# §c Red
# §d Light Purple
# §e Yellow
# §f White
##---------------------------------------
##DO NOT EDIT PAST THIS POINT##
version: 2.0
The following license will not effect you using the plugin as long as the crediting command '/swl' is not changed or removed. 




Creative Commons Licence 
SleepyDog's Work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
Based on a work athttp://www.planetminecraft.com/member/sleepydog/.
I SleepyDog give permission for commercial use of my plugin named 'SimpleWebsiteLinker' providing the user follows the listed terms;
The plugin is not to be sold to any company/user.
The plugin is not to be edited in any such way excluding the file named 'Config.txt'.
The command '/swl' must not be changed, edited or removed.

Removal of the crediting command '/swl' will break the terms and make use of this plugin illigal.
Progress75% complete
Game VersionMinecraft 1.7.10
Tags

9 Update Logs

Update #9 : by SleepyDog 08/18/2014 4:37:07 pmAug 18th, 2014

added photos of the updated fetures and of an edited section.
LOAD MORE LOGS

Create an account or sign in to comment.

1
08/20/2014 5:23 pm
Level 62 : High Grandmaster Hero
MrFang
MrFang's Avatar
Sweet plugin. Definitely a great alternative to Buycraft or any other mainstream plugin. This is nice and simple :) keep up the great work!
1
08/20/2014 5:25 pm
Level 37 : Artisan Button Pusher
SleepyDog
SleepyDog's Avatar
Aha, thankyou. Sadly it only links to the store :P This will work great with the new eula where most people will just link to paypal donation pages.
1
08/18/2014 3:52 pm
Level 6 : Apprentice Architect
LuniaBuilds
LuniaBuilds's Avatar
I agree there is alot unoriginal plugins nowadays
But honestly, I think its pretty nice made when its your first plugin
When it comes to it, coding can be kinda hard, and I think its fine to start out like this
In your future plugin, try going into details, that makes YOUR plugin to THE plugin
Get what Im saying? :)
1
08/18/2014 4:29 pm
Level 37 : Artisan Button Pusher
SleepyDog
SleepyDog's Avatar
Yes, i know its been done before, i made this to fit a theme not be orignal.
No, i dont get what you are saying.

Thanks for the feed back.
1
08/19/2014 1:12 pm
Level 6 : Apprentice Architect
LuniaBuilds
LuniaBuilds's Avatar
My comment is not meant negative in any way :)
Im just saying, its a cool start for your very first plugin.
But a plugin like Essentials is some sort of "THE" plugin
Like instead for looking for "A" plugin, you are looking for "THE" plugin

Im not so good to describe what I mean, but don't take this as something bad. Its a cool start, I would not be able to do it myself.
1
08/19/2014 1:33 pm
Level 37 : Artisan Button Pusher
SleepyDog
SleepyDog's Avatar
I know what you mean, there are many playgins like this.
This is not THE simplewebsitelinker.
This is just another linking plugin.

But i woukd like to say, i did not make this to be published as an amaing plugin, i made this to share what i can do.
1
08/19/2014 2:59 pm
Level 6 : Apprentice Architect
LuniaBuilds
LuniaBuilds's Avatar
Of course you did, and be proud of what you made!
I would never be able to make this :). So see it as a win!
1
08/19/2014 3:04 pm
Level 37 : Artisan Button Pusher
SleepyDog
SleepyDog's Avatar
Thanyou, comments like this make this all worth it.
1
08/17/2014 7:30 am
Level 42 : Master Mage
Pixel
Pixel's Avatar
I also find this plugin (and most others) very unoriginal. The effort level doesn't look high to me, either. Looking at the code, I have found a few things that should be changed, so I'll point them out to you.

It seems like you are blocking out the console from using all of your commands with no error message being displayed. You don't need to check if the sender is the console in this case or even cast the sender to Player; just send them the message! (Use sender.sendMessage())

"lable" is mispelt in your onCommand arguments. For your information, the label is the command sent. It's easier than using cmd.getName() but that's up to you; they're the same thing.

You don't actually have to have log records for when your plugin is enabled and disabled; Bukkit will insert those anyway.

When using &&, you have pointless brackers. "if ((cmd.getName().equalsIgnoreCase("Website")) && ((sender instanceof Player)))" should be if "(cmd.getName().equalsIgnoreCase("Website") && (sender instanceof Player))".

The code is very badly structured. You use three IF statements without even using IF ELSE and ELSE for the last two. This means that the server will have to check three times to see what the command is. If you have 4 commands or more, you should be using the SWITCH statement to see which command is being executed; Google it. Many YouTube tutorials will teach you bad practises.

Moving on, you missed out the @Override above your onEnable and onDisable methods, meaning thet they will never be called. Your "ondisable" method should be "onDisable".

Lastly, you have not checked if the user reloading the configuration is an operator or not (sender.isOp), meaning that anyone can reload the config. You could either check for whether they have the permission or if they are an operator. (The console counts as an operator, too.)

If you have any questions regarding plugin making, feel free to PM me; I'll help you.
1
08/17/2014 8:43 am
Level 37 : Artisan Button Pusher
SleepyDog
SleepyDog's Avatar
Firstly, I want to say Thankyou for the feed back.
i would also like to say, I haven't posted this for the pint of just posting a plugin, as you can tell by the mistakesI haven't  copied this plugin. I have posted this to find people like you who can help me develop further to achieve my dreams and idears when it comes to development of plugins, the second reason of this it so people can see my progress as I become(hopefully) a better developer. This isn't just my first plugin this is my first time ever playing with Java. This plugin took me 6 try's from scratch to get working. It's not fantastic/original I know but I made it and I'm proud. The idea of the download is not to be used, it's to be looked at and so I can revive help. I  glad you have corrected my mistakes as i can bring them out in the next updates, I did not want to post this on bukkit as I don't want it to be widely used. As you can see in the first comments I know and now understand the problem of anyone being able to reload the configuration and show versions and now have a fix. I will also accept the offer of help as this is my first time using java. I am also glad you told me the isop string as this will shorten the previous comment.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome