RustCraft [Clan Wars | Structure Generation | 1.19.2] icon

RustCraft [Clan Wars | Structure Generation | 1.19.2] -----

Provide a Rust like gameplay in Minecraft



[​IMG]
[​IMG]

RustCraft is a plugin directly inspiring from the videogame Rust, where you can create a team, raid some people... or just try to sneak behind trees and play solo.

_____________________________________________________
[​IMG]


I. Clan System - claim territory, have a Clan Leader, and defend the territory similar to Rust

The plugin adds the Clan Chest, which is placed at the center of the territory. When a player decides to create their clan, they place a Clan Chest, and the territory will be created. The Clan Chest is invincible against any type of destruction.


Only the Clan Leader can change the clan parameters, such as; the name, clan invitations, and the Clan Chest location.The Clan Leader can also transfer ownership of their clan.


The land protection will protect all chests placed by players (with the exception of naturally generating chests), in other words, enemy players cannot open chests placed by players from other Clans nor other Clans’ Clan Chests. These chests cannot be exploded by enemy players. However, the protection is applied only if there is no players of the Clan connected. If there is at least one, enemy players can open their chests (the protection must not be too powerful...).


Enemy players can raid other clans by breaking blocks and placing TNT. Enemy players can only place TNT. When placed the TNT will be primed. Enemy players can also break blocks in other Clan Territories, but with a very low digging speed (this only occurs if the clan is protected).

Territory protection isn’t free. The plugin gives a territory value based on items present in the territory’s chests. The more rare items there are, the higher the territory value.

Then, each minecraft day, the members of the Clan must fill the Clan Chest with specific resources to be sure to get the protection the next day.

Note: The protection reset will only occur if a Clan Member has logged in on the previous day.


The plugin also rewards the clan that has obtained the Dragon Egg. Clans can place the Dragon Egg in their claim at a y-level of more than 78 blocks to gain infinite protection (while the Dragon Egg is at the same location).

This game mechanic encourages enemy players to steal the egg for their Clans. The minimum height forces the Clan in possession of the Egg to place it at a "vulnerable" location (they can't just dig the floor, place the egg, and fill the floor).


II. Level & War system

There is also a Clan radius system that changes the radius of the Clan territory. This radius depends on the Clan level. It's here that wars are coming on: players can declare war on other Clans. Clans are given a time limit to kill as many players from the other clan as possible. The Clan that has the highest number of kills win. The winning clan will level up while the other Clan loses a level, (with a minimum of level 1).


III. Structure Generation, with custom loot


The Structure Generation works when a chunk is loaded, not when the world is created. There are 6 different structures possible, with various probability of spawning.

In these structures, you can find 2 types of chests: the RustCraft Chest, or the RustCraft Advanced Chest. RustCraft Advanced Chests are both rarer and contain better loot than the RustCraft Chests.

____________________________________________________
[​IMG]

Most commands begin with “/clan” and contain subcommands, with the exception of Clan invitation management.

Common commands:

/rustcraft info
Displays information about the plugin.

/clan create
Gives the player a Clan Chest. Once placed, the Clan is created.

/clan list
Lists all the Clans present in the server.

/clan join <Clan name>
Join a Clan having its privacy on 'public'.

/accept
Used to accept a player's invitation to their clan.

/decline
Used to refuse a player's invitation to their clan.

Clan member commands:

/clan leave
Allows the player to leave the clan. If there is nobody left in the Clan, it will be deleted.

/clan tp
Allows you to teleport directly to the Clan Chest location.

/clan needs
Prints the new resource quota needed to get the protection.

/clan info
Prints all information about your clan (protection, level, description etc.)

/clan chat <Message>
Allows you to chat privately to clan members

/clan members
Lists all the Clan’s members.

Leader commands:

/clan name <NAME> <COLOR>
Allows the player to change the name of their Clan (the default name is “Clan” + a number, in case of multiple default clans)

/clan lead <PSEUDO>
Allows the player to transfer ownership of their Clan.

/clan invite <PSEUDO>
Allows the player to invite someone to their Clan.

/clan kick <PSEUDO>
Kicks a clan member.

/clan change
Allows the player to move their Clan Chest.

/clan war <Clan Name>
Allows Clan Leaders to declare war on other Clans.
All wars are deleted if the server reloads or stops

/clan <private / public>
Switches the privacy setting of the Clan.

/clan description
Set the description of the Clan.

Admin commands:

/clan reset
Only for Op players or players with the permission " clan.reset" ! It resets all clans and destroy all Clan Chest.

/clan delete <Clan Name>
Only for Op players or players with the permission " clan.delete" ! It deletes the clan selected.

/rustcraft reload
Only for Op players ! It reloads the config file of the plugin.

____________________________________________________ [​IMG]

1. First, you will need the latest version of the plugin World Edit (https://dev.bukkit.org/projects/worldedit/files). This is very important: it allows the plugin to generate structures (if not, you'll get a ton of error messages during the loading of the plugin).

2. You will also need Dynmap if you want the API to work fine ( https://www.spigotmc.org/resources/dynmap®.274/update?update=517958).​

3. Click the Download Now Button and Unzip the folder. Place the plugin file (.jar file) in the plugins folder of your server​

4. Load/Start the server once to create the RustCraft folder.This folder will be in your plugins folder. (~/plugins/RustCraft)

5. The plugin uses 6 SCHEM files that are contained in the .ZIP folder. If Spigot doesn't give you a .zip file, you can download them here . Put those 6 files in the RustCraft folder (~/plugins/RustCraft)

6. Job done! Enjoy!
The plugin config file ( config.yml) gives you the possibility to change a lot of values used by the plugin listed here:
  • The value of each specific item scanned to get the value of the territory
  • The value of each specific resources in the Clan Chest
  • The probability of loot in RustCraft Chests and RustCraft Advanced Chests
  • The probability of the custom structure generation
  • The minimum heigh of the Dragon Egg to provide protection (in blocks)
  • The time between each "wipe" of the resources in the Clan Chest (in seconds)
  • The radius of a Clan Territory (in blocks) for each level
  • The maximum difference of players a Clan must have to be targeted for a war
  • The time a War lasts (in seconds)
  • The name of the world where the player can create a clan, and also where the structure generation will be enabled
  • The activation/deactivation of the plugin tchat
  • The activation/deactivation of ennemy building inside your territory


Furthermore, a file languages.yml must have been created after your first launch.
If you wish to translate to your own language, you can either replace all texts inside, or (if you wish to keep the ' english' language) copy paste after the original text, change the key ' english' to your language and translate all values. After that, you must modify the ' language' value to your language name inside config.yml, and it should be good to go.


You can also use the placeholder system ( only works in the plugin's language file) :
  • {CLAN} : prints the clan name of the player
  • {PLAYER} : prints the player's name
  • {WAR STATUS} prints "IN WAR" if the player's clan is in war, "PEACEFUL" if not

Code (Text):

# all values in the chest in the clan territory
values:
  diamond: 5
  netherite: 20
  iron: 1
  copper: 1
  emerald: 5
  gold: 2
  amethyst: 3
  equipment: 2
  enchanted_equipment: 4
  diamond_equipment: 7
  enchanted_diamond_equipment: 10
  netherite_equipment: 11
  enchanted_netherite_equipment: 15
  golden_apple: 3
  special: 20
  potion: 5
  enchanted_book: 5

# all values concerning the resources in the Clan chest
chest_values:
  cake: 50
  netherite: 40
  emerald: 20
  diamond: 5
  iron: 1
  copper: 1

# all loot chances in the rustcraft chest
loot_chances:
 
  rustcraft_chest:
    maximum_amount_item: 5
    leather: 0.3
    gunpowder: 0.2
    saddle: 0.1
    iron_sword: 0.2
    wheat: 0.4
    music_disc: 0.01
    golden_apple: 0.05
    chainmail_stuff: 0.1
    iron_pickaxe: 0.2
    lapis_lazuli: 0.2
    egg: 0.3
    coal: 0.3
    melon_seed: 0.2
    lead: 0.1
    gold_ingot: 0.2
    name_tag: 0.1
 
  rustcraft_advanced_chest:
    maximum_amount_item: 2
    enchanted_golden_apple: 0.03
    diamond: 0.3
    diamond_sword: 0.25
    diamond_pickaxe: 0.25
    diamond_stuff: 0.15
    enchanted_book: 0.2
    cake: 0.3
    diamond_horse_armor: 0.2
    golden_horse_armor: 0.35
    emerald: 0.2
    potion: 0.2

# chances of generating a structure
structure_generation_chances:
  enemy_base: 0.015
  furnace_base: 0.003
  half_pipe: 0.008
  hangar: 0.002
  shack: 0.01
  little_tower: 0.02

# radius of the clan territory in fonction of his level
radius_per_level:
  lvl_1: 30
  lvl_2: 35
  lvl_3: 40
  lvl_4: 45
  lvl_5: 50

# maximum height needed for the egg protection
dragon_egg_height: 78

# time between each resource wipe (seconds)
time_each_check_clan_value: 1200

# number min/max needed to declare a war to another clan
excess_number_player: 2

# time of a war duration (seconds)
war_time: 1200

# max number of clan members in a clan
clan_members_max: 25

# max number of clans
clan_max_number: 50

# name of the world ('world' is the default name)
world_name: world

# activation of the changes in the tchat
tchat: true

# activation of the mob spawning inside a clan territory
allow_mob_spawn: true

# allow players from enemy clan to place/destroy any block in your territory
allow_enemy_building: false

# language of the plugin
language: english

 

I would recommend however to not change the chances of generating structures too much, as it can affect the RAM used by the server.


Also, the loot chance should not be higher than 50%.The amount of the item is calculated by doubling the chance of spawning. So having a 50/100 chance will always result in > 1 of the item.


When changing resource values for use in the Clan Chest. You must have at least one resource that has the value "1".

Because, for example, if you have to fill the Clan Chest with a value of "11", you put 3 diamonds (Each with a resource value of 5) in the Clan Chest (= 15 value), then 2 of the diamonds (Resource Value of 10) will be consumed, whilst leaving 1. This 1 will cause the territory to not be protected.


The maximum difference of players will check if there are enough players in the targeted Clan, when declaring war, to create a fair fight. For example, if it were set to 2 --> and there are 3 players in the Clan targeted, and there are 6 players in your Clan, the war won't happen, because 6 - 3 = 3 which is > 2.


Finally, just don't go crazy with the configs, like putting "1000" to the minimum height of the Dragon Egg or by putting "100" to the maximum amount of the items in the RustCraft Chest...

______________________________________________________
[​IMG]


[​IMG]

This plugin is the first one I ever created. It took me around 75 hours of development, but it's definitly not perfect. The code isn't totally optimised, and there are surely some errors I might not have found.

This is why I'm asking for you to please give feedback on the plugin via Spigot, or Discord ( https://discord.gg/fvv8NHx), so that I can enhance it, and maybe add more features. The feedback is very important to me, because without it, the plugin dies slowly... Don't forget to share the plugin if you liked it!

I'm French, and I know that my translation skills aren't very high. So my apologies for the eventual errors in this thread, and in the plugin. Many thanks to BingoRufus ( https://www.spigotmc.org/members/bingorufus.611165/) that helped me alot with that problem!
Resource Information
Author:
----------
Total Downloads: 9,291
First Release: Apr 4, 2020
Last Update: Apr 29, 2024
Category: ---------------
All-Time Rating:
14 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings