- Install the plugin on your server and start the server
- Go to your server files into "/plugins/AcceptTheRules/" and open the file "rules.yml"
- Add some new rules or change the existing ones. Each minus is one rule.
- Use double quotes at the beginning and end of each rule to start with special characters.
- You can use "\n" to force a line break. A rule with one or more line breaks, still counts as only one rule
- Save your file
- Enter the command "/atr reload" or restart your server. Now your new rules are active.
Tutorials
Spanish
PlaceholderAPI (with offline support)
-
- %atr_accepted_<playername>%
- %atr_accepteddate_<playername>%
- %atr_version_<playername>%
Developer API
(v.8.0 and higher)
Get the current API version back
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
String atrAPIVersion
= atrAPI.
getAPIVersion
(
)
;
Check if a player has already accepted the rules
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
boolean hasAccepted
= atrAPI.
hasAcceptedTheRules
(player.
getUniqueId
(
)
)
;
Get back a date when the rules were accepted (date & time)
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
Date accpetedDate
= atrAPI.
getAcceptedDate
(player.
getUniqueId
(
)
)
;
Get back the rule version that a player has accepted
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
String playerRulesVersion
= atrAPI.
getAcceptedRulesVersion
(player.
getUniqueId
(
)
)
;
Get back the current rule version
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
String currentRulesVersion
= atrAPI.
getCurrentRulesVersion
(
)
;
Get the player name back to a UUID
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
String playerName
= atrAPI.
getPlayerName
(player.
getUniqueId
(
)
)
;
Get all rules as a list
Code (Java):
AcceptTheRulesAPI atrAPI
=
new AccepTheRulesAPI
(
)
;
List
<String
> rulesFromATR
= atrAPI.
getRules
(
)
;
How to implement AcceptTheRules into your project:
- Add the plugin "AcceptTheRules" from version 8.0 or higher to your libaries in your project.
- Specify in your plugin.yml under "depend: [AcceptTheRules]" to be able to use the functions later on your server.
- Build your own functions with the possibility of API
- Add AcceptTheRules (at least version 8.0 or higher) to your plugins folder, as well as your own plugin that uses the API of AcceptTheRules.