# PvP Plus This mod adds many PvP features that allow players to enable / disable their own PvP and to do PvP tournaments. Some code and images are from the PvP-Button Mod by Phiwari123. ## Usage PvP can be enabled/disabled from the inventory. A new tournament can be initiated by a player by typing /tournament. Then, each playing wanting to play in the tournament has to type /engage during the next minute (this delay is customizable using the `pvpplus.tournament_starting_time` setting, specified in seconds). Any engaged player can leave the current tournament by using `/leave_tournament`. Some additional commands are only executable by the players possessing the `tournament_mod` privilege: * `/start_global_tournament`: immediately starts a tournament engaging every connected players (except those who don't have the interact privilege) * `/stop_tournament`: stops the current tournament * `/remove_from_tournament `: removes a player from the current tournament * `/add_to_tournament `: adds a player to the current tournament ## API ```lua -- Enabling/disabling PvP: pvpplus.pvp_enable(player_name) pvpplus.pvp_disable(player_name) pvpplus.pvp_toggle(player_name) -- PvP tournaments: pvpplus.engage_player(player_name) -- Engage a player for the next tournament pvpplus.start_tournament(starter_name) -- Start a tournament (at least 2 players have to be engaged) pvpplus.start_global_tournament(starter_name) -- Start a tournament engaging every connected players pvpplus.stop_tournament() -- Stop the current tournament pvpplus.allow_engaging(starter_name) -- Allow players to engage themselves by typing /engage pvpplus.remove_from_tournament(player_name) -- Remove a player from the current tournament pvpplus.add_to_tournament(player_name) -- Add a player to the current tournament pvpplus.is_playing_tournament(player_name) -- Is this player playing in the current tournament ? pvpplus.is_running_tournament() -- Is there a tournament currently running ? ``` ## TODO * Using a formspec for the tournament rating * Add a privilege for changing PvP state * Add a HUD for the tournament score * Make the dependence to unified_inventory optional by adding chat commands to change PvP state * Add a formspec for managing tournaments, accessible from the inventory * Testing