VivecraftSpigot | VR API and full Vivecraft server support! icon

VivecraftSpigot | VR API and full Vivecraft server support! -----

VR support for servers + Plugin API



VivecraftSpigot is a companion plugin for Vivecraft, the VR mod for Java Minecraft. VivecraftSpigot is for Spigot servers and adds several enhancements for VR players.

DISCLAIMER: This is NOT the original version of the plugin. The original version can be found here. VivecraftSpigot is a drag-and-drop replacement, with a few differences:
  • Supports multiple versions (Currently 1.19.4, 1.20.2, and 1.20.4)
  • Has basic support for ALL versions (<1.19.4)
  • Has an API for plugins to use
  • Has a maven central repository
    • This means that you have to use com.cjcrafter.vivecraft instead of org.vivecraft
Please do NOT use the original plugin's discord for support requests. That cannot and will not help with this plugin.

This plugin has no support channels. If you experience a bug, you can report it.


Features
  • Vivecraft players will see other Vivecraft players head and arm movements.
  • Support for Vivecraft 2-handed archery.
  • Assign permission groups for VR players.
  • Fixes projectiles and dropped items from VR players.
  • Shrinks Creeper explosion radius for VR players from 3 to 1.75m (Configurable)
  • Option to limit server to Vivecraft players only.
Please take a look at the config.yml for all available configuration options.

Converting from Vivecraft_Spigot_Extensions
  1. Stop your server
  2. Delete Vivecraft_Spigot_Extensions.jar
  3. Rename the plugin folder to VivecraftSpigot
  4. Download VivecraftSpigot and put it in your plugins folder
  5. Done!

Requirements
  • Spigot/Paper
  • (Optional) Vault for permission groups

Plugins using VSE

  • WeaponMechanics - Shoot with guns in VR
  • Have a plugin that supports VR? Please send me a message!

Developer API

HTML:

<dependency>
    <groupId>com.cjcrafter </groupId>
    <artifactId>vivecraft </artifactId>
    <version>3.1.0 </version>
</dependency>
 

The original plugin's API only works on servers with one world, so I highly recommend staying away from the original plugin's Metadata system. Instead, you want to look at the VSE class which is the main plugin class. From there, you can get a VivePlayer instance and check controller position, direction, headset... etc.

Here is an example API usage from WeaponMechanics:
Code (Java):
        // This snippet gets where the player should be shooting their gun from
        if (Bukkit. getPluginManager ( ). getPlugin ( "Vivecraft-Spigot-Extensions" ) != null
                && livingEntity. getType ( ) == EntityType. PLAYER ) {
            // Vivecraft support for VR players

            VivePlayer vive = VSE. vivePlayers. get (livingEntity. getUniqueId ( ) ) ;
            if (vive != null && vive. isVR ( ) ) {
                // Now we know it's actually VR player

                // Get the position and direction from player metadata
                Location location = vive. getControllerPos (mainhand ? 0 : 1 ) ;
                location. setDirection (vive. getControllerDir (mainhand ? 0 : 1 ) ) ;
                return location ;
            }

            // Not VR player, let pass to these normal location finders
        }
License
This project, and the original, is licensed under GNU Public License v3.0.
Resource Information
Author:
----------
Total Downloads: 1,010
First Release: Jul 17, 2023
Last Update: Oct 8, 2024
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings