DefensiveTurrets | Defend Yourself using Turrets! [1.8-1.16] icon

DefensiveTurrets | Defend Yourself using Turrets! [1.8-1.16] -----

Mechanic in which users can place and upgrade Turrets to defend themselves against enemies



[​IMG]
ATTENTION: THIS PLUGIN WILL NOT BE UPDATED ANYMORE
You can check the premium version "ComplexTurrets" here:

https://www.spigotmc.org/resources/complexturrets-defend-yourself-using-turrets-1-8-1-16.92756/

What can I do with DefensiveTurrets?

This plugin allows the users of your server to place different kinds of Turrets to maintain their homes/territories secured. Currently there are 4 types of Turrets (Burst, Laser, Siege and Healing). These turrets will constantly attack (and heal) monsters/players/animals and keep them away from your lands.

You can change a lot of Turret properties like the damage, range, cooldown, speed or sounds. And remember, every Turret can have as many upgrades as you want! (Tutorial of the config below)

[​IMG]

If you want to help me maintain this project alive, I would be grateful if you donate and support my work :)

[​IMG]
- 4 Different Turrets (Burst, Laser, Siege, Healing)
- Configurable Turret Properties:

  • Min and Max damage
  • Block ID, name and lore
  • Cooldown
  • Range
  • As many upgrades as you want
  • Sounds
  • Special options
  • Design of the turret (2 blocks and head)
- Damage and Information Holograms (using HolographicDisplays)
- Minimum distance between Turrets condition
- Turret damages Monsters, Players and Animals (configurable in each turret)
- Per Turret Permission option
- Allies Support for: Factions/SavageFactions/SaberFactions/FactionsUUID/Towny/Clans/Lands/Better Teams
- Player Allies per Turret
- Ammunition for Turrets
- Infinite ammo option
- Turret Placement Limit
- Works in 1.8+
- Messages.yml file for translation

[​IMG]

1) Download DefensiveTurrets and Vault from this link: https://dev.bukkit.org/projects/vault
If you want holograms to show up, you need HolographicDisplays: https://www.spigotmc.org/resources/holoinfo-holographic-information-1-8-1-13.65689/

2) Use /dt give <turret> <player> to give players a Turret. You can use the command from the console. Remember to use a valid turret name. (Burst, Laser, Siege or Healing)
3.1) Place the Turret Block on the ground and right click it. An inventory will be opened which is used to check the current turret properties and to upgrade its level (to have better stats)
3.2) You can open the Turret options menu where you can change some turret properties. Here you can disable targets, like players, monsters or animals. Also, you have a button for enabling or disabling the turret.
[​IMG]
3.3) Players can add other players to a whitelist which the turret should not attack. You can remove them when you want in the same inventory.
3.4) If the ammunition option is enabled in the config, you need to add ammo to your turret in order to start shooting. Remember to disable your turret whenever you want to add ammo.
[​IMG]
3.5) If you are OP or have the defensiveturrets.admin/defensiveturrets.infiniteammo permission an extra item will appear on the inventory to define if the turret should have Infinite Ammo or not.

4) Change the turrets properties as you want in their respective configs (In the turrets folder you can find the turrets files) with the following tutorial:
Each of the turret files have the same format, but the most important one is the "Turret" section in which you rename the turret, change their sounds and finally, create upgrades for it. As each tower is different, they have different properties.

If you want to define the block of the turret as a head use:
id: "PLAYER_HEAD" (or "SKULL_ITEM:3" for 1.8-1.12)
head: "id;texture"
Here you can find heads: https://minecraft-heads.com/

For the sound property be careful because sound names are different in each Minecraft version:
Sounds 1.8: http://docs.codelanx.com/Bukkit/1.8/org/bukkit/Sound.html
Sounds 1.14: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html

[​IMG]

Description: Fast speed turret with no extra abilities.
#Format: - "Price;min_damage;max_damage;cooldown(in seconds);range(in blocks)"
upgrades:
- "0;1-1.5;0.75;10"
- "800;1.75-2.25;0.5;13"
- "2500;2.75-4;0.25;16"
[​IMG]

Description: Medium speed turret that pushes the enemy on every hit.
#Format: - "Price;min_damage;max_damage;cooldown(in seconds);range(in blocks);power"
upgrades:
- "0;5-7;2;15;0.5"
- "800;9-13;1.75;17;1"
- "2500;16-22;1.5;20;1.5"
[​IMG]

Description: Slow speed turret that damages multiple enemies on every hit.
#Format: - "Price;min_damage;max_damage;cooldown(in seconds);range(in blocks);radius"
upgrades:
- "0;4-9;3;8;1.5"
- "800;8-15;2.5;11;2.5"
- "2500;13-20;2;14;3.5"
[​IMG]

Description: Slow speed turret that heals multiple allies.
#Format: - "Price;min_damage;max_damage;cooldown(in seconds);range(in blocks);max_targets"
upgrades:
- "0;2-4;6;5;2"
- "800;3-5;5.5;6;3"
- "2500;4-6;5;7;4"
Code (YAML):
Config:
    enable_turrets_only_when_owner_is_online
: false
    min_distance_between_turrets
: 1
    damage_holograms
: true
    information_holograms
: true
    new_version_reminder
: true
    per_turret_permissions
: false
    ally_protection
: true
    walls_better_check
: false
    turrets_require_ammunition
: true
    shoot_through_liquids
: false
    ignore_damage_to_invisible_players
: true
    turrets_global_check_time
: 5
    turret_limit_permissions
:
        enabled
: true
        default_limit
: 1
    protect_turrets_from_explosions
: true
    drop_turret_on_destroy
: true
    receive_turret_on_destroy
: true
    blacklisted_worlds
:
   - minigames
    - lobby
    default_turret_options
:
        attack_monsters
: true
        attack_animals
: false
        attack_players
: false
    delete_turret_item
:
        id
: "REDSTONE_BLOCK"
        name
: "&cDestroy Turret"
        lore
:
       - "&7This action cannot be undone!"
    turret_options_item
:
        id
: "CRAFTING_TABLE"
        name
: "&aTurret Options"
    inventory_back_item
:
        id
: "ARROW"
        name
: "&7Back"
#If this option is enabled, the turret will be deactivated when the player leaves the server.
enable_turrets_only_when_owner_is_online: true

#This number defines the minimum separation in blocks between turrets.

min_distance_between_turrets: 1

#These options allows you to enable holograms when turrets hits enemies and when players look at turrets.
damage_holograms: true
information_holograms: true

#If this option is enabled, you have to add the corresponding permission of turrets to players. (defensiveturrets.use.<turret_name>)

per_turret_permission: true

#If this option is enabled, you can limit the amount of turret that players can place. (defensiveturrets.limit.X). If a group doesn't have the permission, the default_limit will be used.

turret_limit_permissions:
enabled: true
default_limit: 1

#If this option is enabled, explosions will not affect turrets. If is set to false, turrets will be destroyed and removed from the config when exploding.

protect_turrets_from_explosions: true

#If this option is enabled, allies like factions,towny will not be attacked by your turrets.
ally_protection: true

#If this option is enabled, more blocks will be checked to determine if there are obstacles between an entity and the turret. The performance could decrease a little bit.

walls_better_check: false

#If this option is enabled, turrets will need ammo in order to shoot. You can give ammo to players using the command below.

turrets_require_ammunition: true

#If this option is enabled, turrets will be able to shoot through water and lava.

shoot_through_liquids: false

#This option will fix and remove turrets which were destroyed by external sources, like WorldEdit. Here you can set the amount of time (in seconds) of these periodical checks.

turrets_global_check_time: 5

#If enabled, whitelisted players will be checked ignoring upper and lower cases.

whitelist_ignore_case: true

#If enabled, siege turrets will destroy ALL blocks with the explosion.

siege_turret_destroy_blocks: false

#Players will not be able to place Turrets in these worlds.

blacklisted_worlds:
- minigames
- lobby

#If this option is enabled, players will receive the Turret block when destroying it. Doesn't keep the upgrades.

receive_turret_on_destroy: true

#When this is enabled, turrets will drop a turret block when being destroyed (like from explosions, or worldedit)

drop_turret_on_destroy: true

#Here you can define the default values for some turret options.
default_turret_options:
attack_monsters: true
attack_animals: false
attack_players: false
Code (YAML):
Messages:
    prefix
: "&8[&aDefensive&9Turrets&8]"
    noPermissions
: "&cYou don't have permissions to execute that command."
    configReloaded
: "&aConfig Reloaded!"
    giveCommandError
: "&cYou need to use &7/dt give <turret> <player>"
    playerNotOnline
: "&cThat player is not online."
    turretDoesNotExist
: "&cThat turret doesn't exists."
    giveCommandSuccessPlayer
: "%name% &aadded to your inventory!"
    giveCommandSuccessSender
: "&aYou gave %name% &ato &e%player%&a!"
    turretCreated
: "&aTurret created!"
    cantDestroyTurret
: "&cTo destroy a Turret you need to open its inventory using Right Click."
    turretInventory
: "&9Turret Inventory"
    notYourTurret
: "&cThis is not your turret!"
    openingTurretInventory
: "&aOpening Turret Inventory."
    turretRemoved
: "&aTurret removed!"
    turretUpgraded
: "&aTurret upgraded to Level: &e%level%&a!"
    noEnoughMoney
: "&cYou don't have enough money to upgrade this Turret."
    minDistanceError
: "&cThere is another turret nearby!"
    damageHologram
: "&c-%damage% &8[&a%player%&8]"
    healHologram
: "&a+%heal%&4❤ &8[&a%player%&8]"
    informationHologram
:
   - "&8[&6%turret_name%&8]"
    - "&7Owner
: &a%owner%"
    - "&7Level
: &a%level%"
    - "%damage_type%: &a%min%&8-&a%max%"
    - "%error%"
    informationHologramNoAmmoError
: "&cOut of ammo!"
    informationHologramNotEnabledError
: "&cTurret disabled!"
    informationHologramTypeDamage
: "&7Damage"
    informationHologramTypeHeal
: "&7Heal"
    soundError
: "&7&l%name% &cis not a valid Sound. Check your config!"
    placeTurretNoPermissions
: "&cYou don't have permissions to use that Turret."
    turretOptionAttackMonsters
: "&6Attack Monsters"
    turretOptionAttackPlayers
: "&6Attack Players"
    turretOptionAttackAnimals
: "&6Attack Animals"
    turretOptionEnabled
: "&7Status: &aENABLED"
    turretOptionDisabled
: "&7Status: &cDISABLED"
    turretDestroyed
: "&cYour &a%name% &cin &8[&7%x_coord%,%y_coord%,%z_coord%&8] &cwas destroyed!"
    turretLimitError
: "&cYou can't place another turret, your limit is: &7%limit%"
    turretOptionPermissionsError
: "&cYou don't have permissions to modify this option."
    turretOptionPlayers
: "&6Whitelisted Players"
    turretOptionPlayersList
: "&8- &a%name%"
    turretOptionPlayersListNone
: "&8None"
    turretOptionPlayersPlayerLore
:
   - "&8[&cRight Click to remove player&8]"
    turretOptionPlayersAddPlayer
: "&aAdd Player"
    turretOptionPlayerRemoved
: "&cPlayer &e%name% &cremoved from your Turret."
    turretOptionPlayersAddPlayerInfo
: "&aWrite the name of the player you want to add to your turret:"
    turretOptionAddPlayerNotValid
: "&cThat's not a valid player name."
    turretOptionAddPlayerOwnName
: "&cIt's not necessary to add you to your own turret."
    turretOptionAddPlayerAlreadyAdded
: "&cThat player is already added on this turret."
    turretOptionAddPlayerSuccess
: "&aPlayer &e%name% &aadded to your Turret!"
    giveammoCommandError
: "&cYou need to use &7/dt giveammo <turret> <player> <amount>"
    giveammoCommandSuccessPlayer
: "%name% &aadded to your inventory!"
    giveammoCommandSuccessSender
: "&aYou gave %name% &ato &e%player%&a!"
    amountError
: "&cYou need to write a valid amount."
    turretOptionAmmunitionStorage
: "&6Ammunition Storage"
    turretOptionAmmunitionCurrentAmmo
: "&7Current Ammo: &9%ammo%"
    turretOptionAmmunitionError
: "&cThat's not the correct ammo for this turret."
    turretEnabled
: "&6Turret: &aENABLED"
    turretDisabled
: "&6Turret: &cDISABLED"
    turretStatusMessage
: "&8[&7Click to change Status&8]"
    turretOptionAmmunitionDisabledError
: "&cThe turret must be disabled to add ammo."
    placeTurretWorldError
: "&cYou can't place a turret in this world."
    removeTurretsCommandError
: "&cYou need to use &7/dt removeturrets <world/player/all> <value>"
    removeTurretsRemoved
: "&e%turrets% &aTurrets were removed!"
    removeTurretsNoRemoved
: "&cNo Turrets were removed!"
    turretInfiniteAmmoEnabled
: "&6Infinite Ammo: &aENABLED"
    turretInfiniteAmmoDisabled
: "&6Infinite Ammo: &cDISABLED"
    turretInfiniteAmmoStatusMessage
: "&8[&7Click to change Status&8]"
    playerDeath
: "&f%player% &fwas killed by &a%killer% &f%turret%"
 
5) If you change something in the config remember to use /dt reload to save the changes. If you see nothing happens, then it's better to stop your server and start it again.
Currently the plugin has a small API.

For this to work you need to add my plugin to your plugin external jars dependencies and to set softdepends: DefensiveTurrets on your plugin.yml file

Code (Java):
//Event called when player places a Turret Block
@EventHandler
public void placeTurret (TurretPlaceEvent event ) {
   Player player = event. getPlayer ( ) ;
    String turretName = event. getTurretName ( ) ;
   Location turretLocation = event. getLocation ( ) ;
}
Code (Java):
//Event called when a Turret kills an entity
@EventHandler
public void turretKill (TurretKillEvent event ) {
    String owner = event. getOwnerName ( ) ;
    String turretName = event. getTurretName ( ) ;
    Entity killedEntity = event. getEntity ( ) ;
}
Chinese by @Neubulae : Click Here
Portuguese by @ResleyNation : Click Here
French by @Kittle : Click Here
Slovak by @Pist0len_SK : Click Here
German by @Lord_Junes :
Click Here
Spanish by MeikersYT : Click Here

[​IMG]
-/dt give <turret> <player> Gives the chosen turret to the specified player.
-/dt giveammo <turret> <player> <amount> Gives ammo to the player.
-/dt removeturrets <world/player/all> <value> Removes placed turrets.
To remove turrets from a world: /dt removeturrets world <name>
To remove turrets from a player: /dt removeturrets player <name>
To remove ALL turrets: /dt removeturrets all
-/dt reload Reloads the config.
-/dt help Shows this message.
(alias: /defensiveturrets)

[​IMG]
- defensiveturrets.admin
- defensiveturrets.admin.open
(Allows to open other people's turrets)
- defensiveturrets.use.<turret_name> (If per_turret_permissions is enabled on the config)
- defensiveturrets.limit.X (If turret_limit_permissions is enabled on the config. For example, groups with the permission defensiveturrets.limit.5 will be able to place a maximum of 5 turrets. If a group doesn't have a limit permission the default limit will be used)
- defensiveturrets.infiniteammo (To allow players activate the infinite ammo item on turrets)
- defensiveturrets.options.attackmonsters
- defensiveturrets.options.attackplayers
- defensiveturrets.options.attackanimals

[​IMG]
[​IMG]
[​IMG]

[​IMG]


Videos:
English by: @LuxLacis



German by: @KeniiY


Spanish by Me


Please avoid posting bad ratings before asking. If you have problems or bugs with the plugin contact with me or post on the plugin discussion and I will take a look at it. Enjoy the plugin ;)
Resource Information
Author:
----------
Total Downloads: 35,019
First Release: May 8, 2019
Last Update: Feb 10, 2021
Category: ---------------
All-Time Rating:
131 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings