This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExamplePlugin extends JavaPlugin { | |
private static MySQLDatabase database; | |
public void onEnable() { | |
for (MySQLAPI api : MySQLAPI.getMysqlDBs()) { | |
api.initMySQLAPI(); | |
database = new MySQLDatabase("Example", api.getDatabase()); | |
} | |
database.create(database.createColumn("UUID", MySQLAPI.MySQLDataType.VARCHAR, 50), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//init your yml file storage here | |
private static YamlStorage yamlStorage = new YamlStorage("plugins/AlphaLibary", "config.yml"); | |
//init your json file storage here | |
private static JsonStorage jsonStorage = new JsonStorage("plugins/AlphaLibary", "example.json"); | |
//init your mysql storage here | |
private static MySQLStorage mySQLStorage = new MySQLStorage(new MySQLDatabase("Your table", "Your database")); | |
//adding some values | |
public static void setDefaultYAML() { | |
yamlStorage.setValue( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onEnable() { | |
Arena played = Arena.getArena("SG22"); //Needs the name of the map inside the arenas.yml file | |
played.loadArena(); | |
Bukkit.broadcastMessage("The map " + played.getName() + " is played"); | |
Bukkit.getPlayer("AlphaHelix").getInventory().addItem(played.getIcon().getBase()); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) <2016> <AlphaHelixDev> | |
* | |
* This program is free software: you can redistribute it under the | |
* terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JoinListener implements Listener { | |
@EventHandler | |
public void onJoin(PlayerJoinEvent e) { | |
PlayerUtil.spawnPlayerForPlayer(e.getPlayer(), e.getPlayer().getLocation(), e.getPlayer(), "Hello " + e.getPlayer().getName()); | |
//if player looks at a FakeEntity it disappears | |
PlayerUtil.removePlayerForPlayer(e.getPlayer(), FakeAPI.getFakePlayerInRange(p, 4).getNmsEntity()); | |
//or it follows him | |
PlayerUtil.followPlayerForPlayer(e.getPlayer(), e.getPlayer(), FakeAPI.getFakePlayerInRange(e.getPlayer(), 4).getNmsEntity()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1/2 Ores - For every 2 ores you mine, 1 drops. Every single ore is seperate from one and another. | |
3x Arrows - When you shoot with your bow, not one, but three arrows get shot out. | |
Monsters Inc - If you place a door on the map, go through it and there's 2 or more doors on the map, you will be teleported to one of those doors. | |
AppleFamine - Apples do not drop from trees. | |
Armor v Health - For every half Armor Point you add to your Armor bar, half a Health Point will be taken away from your Health. Any health lost to armor will not be healed back. | |
Backpacks - Players have extra inventory space(the backpack), that they can access using a command. When a player dies the "backpack" drops as a chest. | |
Bald_Chicken - Chickens do not drop feathers on death, instead, skeletons drop an amount between 4 and 8 arrows on death. | |
Barebones - The Nether is disabled, and iron is the highest tier you can obtain through gearing up. When a player dies, they will drop 1 diamond, 1 golden apple, 32 arrows, and 2 string. You cannot c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scoreboard: | |
Lobby: | |
show: true //checks if the whole Scoreboard is shown | |
title: '&7-=X &bUHC &7X=-' //sets the Title of the Lobby Scoreboard | |
Kills: | |
show: true //checks if this will be shown | |
message: '&7Your &cKills&7: &c[kills]' //sets what will be shown in the Scoreboard | |
Deaths: | |
show: true | |
message: '&7Your &cDeaths&7: &c[deaths]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blocks: | |
Ore: | |
Coal: | |
enabled: true //checks if you can mine this ore | |
drop: coal:2 //first argument is the Material the second after the ":" is the amount which will be dropped when you mine it | |
Iron: | |
enabled: true | |
drop: iron_ingot:2 | |
Gold: | |
enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Teams: | |
Red: | |
name: Red //Teamname which will be shown to player | |
color: red //color of the team | |
maxSize : 2 //sets the max. amount of player that can join this team | |
Yellow: | |
name: Yellow | |
color: yellow | |
maxSize : 2 | |
Blue: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prefix: '&7[&bUHC&7] ' #Plugin Prefix | |
BungeeMode: false #checks if BungeeCord is enabled | |
BungeeServer: lobby #sets the Server too which the player will be send | |
Reset World: true #checks if the world will been reseted at the end of the game | |
Border: | |
size: 3000 #Bordersize | |
getCloser: true #checks if border getting closer | |
movingBlocks: 500 #sets blockamount which border will pass | |
moving after min: 10 #sets after which time border will move | |
damage: 2 #sets the dealed damage of border |