Home›Java›Mods›TempBanAPI | Editable | Simple | Placeholders!
TempBanAPI | Editable | Simple | Placeholders!
ModsJava

TempBanAPI | Editable | Simple | Placeholders!

Java mod listed for Minecraft 1.8–1.12. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Information:​

  1. I made this because I thought some new people would need it. Also, someone said they had no clue how they would even start with temp-banning, so yeah, here you go lol.
  2. This API is pretty simple yet useful if you don't know how to use time in Java.
Features:​

  1. Ability to use an '&' symbol for colors. (Usage: “&cYou have been banned!")
  2. Separate lines with ";;" (Usage: "Line 1;;Line 2")
  3. Very simple to use and install.
  4. Contains placeholders! (%time%, %kicker%, %reason%)
  5. Active author!
Installation:​

  1. Download the TempBanAPI.jar onto your computer.
  2. Eclipse: Go back into your IDE and right click on your project.
  3. Hover over 'Build Path' and select 'Configure Build Path..'
  4. Click on 'Add External JARs...' on the right-hand side.
  5. Find where you saved the JAR and double-click it.
  6. Hit OK in the bottom right.
  7. Add the jar to your plugins folder.
  8. You are done! All you need to do is access the method(s)!
Use:

Normal method:​
Spoiler: Normal Method
Code (Text):
            //           Player Time Unit   Banner    Reason          Message
            TBan.tempBan(player, 1, "min", "Server", "Greifing", "You have been banned!");
 
Using multiple lines:​
Spoiler: Multiple Lines
Code (Text):
                                  ;; Seperates different lines!
            TBan.tempBan(player, 1, "min", "Server", "Greifing", "Line 1;;Line 2;;Line 3");
 

Valid units of time:​
Spoiler: Valid Time Units
sec = Second [Ex: TBan.tempBan(player, 1, "sec", "", "", ""); = 1 Second Ban]

min = Minute [Ex: TBan.tempBan(player, 1, "min", "", "", ""); = 1 Minute Ban]

hour = Hour [Ex: TBan.tempBan(player, 1, "hour", "", "", ""); = 1 Hour Ban]

week = Week [Ex: TBan.tempBan(player, 1, "week", "", "", ""); = 1 Week Ban]

month = Month [Ex: TBan.tempBan(player, 1, "month", "", "", ""); = 1 Month Ban]

year = Year [Ex: TBan.tempBan(player, 1, "Year", "", "", ""); = 1 Year Ban]


Using Placeholders:​
Spoiler: Placeholders
%reason% = Reason the player was banned [Greifing]
%kicker% = Who the player was banned by [Server]
%time% = Time left until ban is over [1 minute]

Code (Text):
            TBan.tempBan(player, 1, "min", "Server", "Griefing", "&cBanned for: %reason% ;; &aBanned By: %kicker% ;; &3Time Left: %time%");

Example:

Make it look like AdvancedBan:​
Code (Text):
TBan.tempBan(p, 1, "min", "Server", "Greifing", "&cTBanAPI &8&l- &7Temporary Banned!;;;;&cReason: &7%reason%;;;;&cBanned By &8&l> &7%kicker%;;&cTime Left &8&l> &7%time%;;;;&7Appeal on our forums.;;;;&eForum &8&l> &cMyServer.com");
Spoiler: Output
[​IMG]


I will update the thread if I think of something else to add, but for now, this is all. If you have any questions or suggestions AT ALL message me on Spigot and I will respond as soon as I see it! :) Please, consider giving this API a rating so I can know if it is useful to you guys/gals on Spigot!

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

TempBanAPI | Editable | Simple | Placeholders! is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 437 times (via Spigot). Download it and open it directly in the game.

Explore more