Advertisement
Guest User

Untitled

a guest
Dec 26th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1. RenoSG
  2. RenoSG plugin is a plugin that is based on a pot pvp. After game gets required amount of players pre-match will begin and player will have some time to look around and find themself best direction to go. Last to live is a winner.
  3.  
  4. Author: FaceSlap_/Activated_
  5.  
  6. PRICES
  7. ◆ Source (With Updates): $40,99
  8. ◆ Jar is included in resource purchase!
  9.  
  10. Want re-sell rights?
  11. Re-sell rights are €150
  12.  
  13.  
  14. [SPOILER="API"]Will post when I have written up the final documentation[/SPOILER]
  15.  
  16. Required Plugins:
  17. None
  18.  
  19. FEATURES
  20. Configuration
  21. Announce - Bungee announce that the game is about to start
  22. Data saved in MongoDB
  23. Synchronized data and settings
  24. Chest configuration in game
  25. Start Countdown
  26. Pre-match Countdown
  27. Feasts Countdown
  28. PvP Countdown
  29. Deathmatch Countdown
  30. Enderpearl Cooldown
  31. CombatTag
  32. CustomTab
  33. Leaderboards
  34. Lobby support as fallback server
  35. Lobby support as waiting world
  36. Glass Border (Like Badlion)
  37. Colors system (Main color, Secondary color, Middle color) - can be edited in gui in game - http://prntscr.com/lsjit9
  38. Points system (gain points by killing other players)
  39. Settings for players - based on points rewards
  40. So much more..
  41. DEFAULT CONFIGURATION
  42. [CODE]MONGODB:
  43. ADDRESS: 'mongoAdress'
  44. PORT: 25565
  45. DATABASE: 'mongoBase'
  46. AUTHENTICATION:
  47. ENABLED: false
  48. USERNAME: 'mongoUser'
  49. PASSWORD: 'mongoPassword'
  50. DATABASE: 'mongoBase'
  51. COLORS:
  52. MAIN: '&6'
  53. SECONDARY: '&f'
  54. MIDDLE: '&e'
  55. ROADS:
  56. MAKE-ROADS: false
  57. ROAD-MATERIALS:
  58. - 'COBBLESTONE'
  59. - 'GRASS'
  60. - 'GRAVEL'
  61. - 'STONE'
  62. CHAT-FORMAT:
  63. ENABLED: true
  64. FORMAT: '&e<player_display_name>&7: &e<message>'
  65. SERVER-PREMIUM: false
  66. LEADERBOARD-FORMAT: '&f<pos>. &e<name>&7: &7(&6<amount>&7)'
  67. PREFIXES:
  68. GAME: '&7[&6&lPotSG&7] '
  69. BORDER: '&7[&6&lBorder&7] '
  70. WORLDS:
  71. LOBBY: 'lobby'
  72. GAME: 'potsg_map'
  73. #IF YOU NEED TO SET SPAWN LOCATION USE DEFAULT COMMAND /setworldspawn, here you can set only yaw and pitch directions
  74. LOCATIONS:
  75. LOBBY:
  76. YAW: -90
  77. PITCH: 0
  78. BOOLEANS:
  79. PRE-LOAD-CHUNKS: true
  80. LOBBY-ENABLED: true
  81. DEATH-MATCH: true
  82. LOBBY-FALLBACK-SERVER: 'hub'
  83. DEATH-MATCH:
  84. FLOOR-MATERIALS:
  85. - 'BEDROCK'
  86. - 'STONE'
  87. WALL-MATERIALS:
  88. TOP:
  89. - 'FENCE'
  90. BEETWEEN:
  91. - 'BEDROCK'
  92. - 'COBBLESTONE'
  93. - 'STONE'
  94. BOTTOM:
  95. - 'BEDROCK'
  96. INFORMATIONS:
  97. WEB: 'www.your-web.com'
  98. IP: 'mc.your-ip.eu'
  99. TS: 'ts.your-ip.eu'
  100. STORE: 'store.your-store.com'
  101. SERVER: 'SG1'
  102. BORDER:
  103. START: 500
  104. SHRINK-UNTIL: 25
  105. SHRINK-EVERY-MINUTES: 5
  106. SHRINK-STREAM: '500;200;150;100;50;25'
  107. START-BORDER: 500
  108. REBOOT_COMMAND: 'restart'
  109. TITLES:
  110. TAB: ' &6&lPotSG &c(Beta)'
  111. SCOREBOARD: '&6&lPotSG &c(Beta])'
  112. JOIN-MESSAGE:
  113. - '&7&m------------------------'
  114. - '&eWelcome, &f<player> &eto &6PotSG &c[Beta]'
  115. - ''
  116. - '&c&lThis is FFA game and teaming is not allowed.'
  117. - '&c&lPlease play on yor own and avoid teaming.'
  118. - ''
  119. - '&7&oPlease report all bugs to our staff members!'
  120. - '&7&m------------------------'
  121. POINTS:
  122. PER-KILL: 5
  123. PER-WIN: 10
  124. MINIMUM-PLAYERS-TO-START-GAME: 10
  125. MAXIMUM-PLAYERS-PER-GAME: 30
  126. COUNTDOWNS:
  127. IN-SECONDS:
  128. START: 20
  129. PRE-MATCH: 60
  130. PVP-PROT: 180
  131. REBOOT: 20
  132. IN-MINUTES:
  133. FEASTS-SPAWN: 10
  134. #DEATHMATCH COUNTDOWN WILL START AFTER FEAST COUNTDOWN
  135. DEATH-MATCH: 3
  136. [/CODE]
  137. AVAILABLE COMMANDS
  138. [CODE]⇨ /color - edit colors
  139. ⇨ /announce - bungee announce that the game will start soon
  140. ⇨ /data - all commands available for data
  141. ⇨ /game - all commands available for in-game stuff
  142. ⇨ /reloadfiles - reload all files
  143. ⇨ /respawn - respawn player if respawn info is valid
  144. ⇨ /spectator add:remove <player>
  145. ⇨ /settings
  146. ⇨ /spectatorchat
  147. ⇨ /stats[/CODE]
  148. Code snippets
  149. Main
  150. [SPOILER="Reno.java"]
  151. [CODE]package me.activated.renosg;
  152.  
  153. import lombok.Getter;
  154. import lombok.Setter;
  155. import me.activated.renosg.border.BorderManager;
  156. import me.activated.renosg.layouts.BoardLayout;
  157. import me.activated.renosg.utils.Utils;
  158. import me.activated.renosg.utils.leaderboards.LeaderboardManager;
  159. import me.activated.renosg.other.PlayerListener;
  160. import me.activated.renosg.layouts.TabLayout;
  161. import me.activated.renosg.managers.WorldsManager;
  162. import me.activated.renosg.utils.RegisterHandler;
  163. import me.activated.renosg.utils.board.BoardManager;
  164. import me.activated.renosg.utils.command.CommandFramework;
  165. import me.activated.renosg.utils.configurations.ConfigFile;
  166. import me.activated.renosg.utils.tab.TabProvider;
  167. import me.activated.renosg.utils.tasks.DataSaveTask;
  168. import me.activated.renosg.utils.tasks.LobbyTask;
  169. import me.activated.renosg.utils.tasks.PlayerTask;
  170. import org.bukkit.Bukkit;
  171. import org.bukkit.ChatColor;
  172. import org.bukkit.plugin.java.JavaPlugin;
  173.  
  174. import java.util.ArrayList;
  175. import java.util.Arrays;
  176. import java.util.List;
  177.  
  178. @Getter
  179. @Setter
  180. public class Reno extends JavaPlugin {
  181. @Getter
  182. public static Reno instance;
  183. private CommandFramework framework;
  184. private List<ConfigFile> files = new ArrayList<>();
  185. private BoardManager boardManager;
  186. private boolean pluginLoading;
  187.  
  188. @Override
  189. public void onEnable() {
  190. instance = this;
  191. pluginLoading = true;
  192. framework = new CommandFramework(this);
  193.  
  194. setBoardManager(new BoardManager(this, new BoardLayout()));
  195. new TabProvider(this, new TabLayout());
  196. registerConfigurations();
  197.  
  198. if (!isBorderShrinksStreamValid()) {
  199. Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + "[Reno] Reno plugin can't be enabled. Please check your configuration for " + ChatColor.YELLOW + "Border Shrinks Stream.");
  200. Bukkit.getPluginManager().disablePlugin(this);
  201. return;
  202. }
  203.  
  204. RegisterHandler.loadListenersFromPackage(this, "me.activated.renosg.listeners");
  205. RegisterHandler.loadListenersFromPackage(this, "me.activated.renosg.managers");
  206. RegisterHandler.loadCommandsFromPackage(this, "me.activated.renosg.commands");
  207.  
  208. getServer().getPluginManager().registerEvents(new PlayerListener(), this);
  209.  
  210. new LeaderboardManager();
  211. new BorderManager();
  212.  
  213. getServer().getScheduler().scheduleAsyncRepeatingTask(this, new LobbyTask(), 20L, 20L);
  214. getServer().getScheduler().scheduleSyncRepeatingTask(this, new PlayerTask(), 2L, 2L);
  215. getServer().getScheduler().scheduleSyncRepeatingTask(this, new DataSaveTask(), 200L, 200L);
  216.  
  217. new WorldsManager();
  218. Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + "[Reno] Beta version is now enabled.");
  219. }
  220.  
  221. public ConfigFile getConfiguration(String name) {
  222. return files.stream().filter(config -> config.getName().equals(name)).findFirst().orElse(null);
  223. }
  224.  
  225. public boolean isBorderShrinksStreamValid() {
  226. String shrinkStream = Reno.getInstance().getConfiguration("config").getString("BORDER.SHRINK-STREAM");
  227. String[] shrinksStream = shrinkStream.split(";");
  228.  
  229. for (String shrink : shrinksStream) {
  230. if (!Utils.isInteger(shrink)) {
  231. return false;
  232. }
  233. }
  234. return true;
  235. }
  236.  
  237. public void registerConfigurations() {
  238. files.addAll(Arrays.asList(
  239. new ConfigFile("config"),
  240. new ConfigFile("messages"),
  241. new ConfigFile("chests")
  242. ));
  243. }
  244.  
  245. public void setBoardManager(BoardManager boardManager) {
  246. this.boardManager = boardManager;
  247. long interval = this.boardManager.getAdapter().getInterval();
  248. this.getServer().getScheduler().runTaskTimerAsynchronously(this, this.boardManager, interval, interval);
  249. this.getServer().getPluginManager().registerEvents(this.boardManager, this);
  250. }
  251. }
  252. [/CODE]
  253. [/SPOILER]
  254. MEDIA
  255. [SPOILER="Media"][MEDIA=imgur]a/I0IbzqY[/MEDIA][/SPOILER]
  256. PROOF OF OWNERSHIP
  257. [SPOILER="Proof of ownership"]
  258.  
  259. [/SPOILER]
  260.  
  261. Contact Informations
  262. ϟ Discord: Activated_#1539
  263. ϟ Telegram: Activated99
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement