AcceptTheRules | Forces players to read and accept your rules icon

AcceptTheRules | Forces players to read and accept your rules -----

Reward players by accepting rules | The rules plugin for your server



Support




How to change the rules?
  1. Install the plugin on your server and start the server
  2. Go to your server files into "/plugins/AcceptTheRules/" and open the file "rules.yml"
  3. Add some new rules or change the existing ones. Each minus is one rule.
    1. Use double quotes at the beginning and end of each rule to start with special characters.
    2. You can use "\n" to force a line break. A rule with one or more line breaks, still counts as only one rule
  4. Save your file
  5. Enter the command "/atr reload" or restart your server. Now your new rules are active.

[​IMG]



Tutorials

Spanish





PlaceholderAPI (with offline support)
    • %atr_accepted%
    • %atr_accepted_<playername>%
    • %atr_accepteddate%
    • %atr_accepteddate_<playername>%
    • %atr_version%
    • %atr_version_<playername>%
    • %atr_currentversion%
    • %atr_rulesamount%
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.
[​IMG]
Resource Information
Author:
----------
Total Downloads: 22,380
First Release: Feb 25, 2018
Last Update: Oct 16, 2024
Category: ---------------
All-Time Rating:
38 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings