Giter Site home page Giter Site logo

happytrails's Introduction

HappyTrails

Welcome to HappyTrails, a trails plugin for Sponge!

Authors: gabizou

The intention of this plugin is pretty simple: Make fancy trails for players to use in game with permissions! The limit is only as far as your imagination! There are a default set of trails provided, however, they are not required to persist! You, as a server administrator, can customize every single trail and even add or remove trails!

Current Features

  • Set trails on yourself
  • Remove a trail from yourself
  • Trails persist between restarts/logins so you don't have to set it every time!
  • Fallback trails to the default if your last used trail was removed or changed!
  • Only uses SpongeAPI 5.x as a base, so compatible with Minecraft 1.10.2 servers and up!

Commands

Command Description Permission
/trail set <trailId> Sets your current trail to the desired one happytrails.command.set
/trail reset Resets your trail, removes it from you as a player happytrails.command.reset

Trail Config

The configuration file is fairly dynamic. It will generate a default set of trails for you, as a server owner, to utilize and familiarize yourself with the options. The trails themselves are fully serializable and deserializable using Sponge's native systems. The current default configuration looks like so:

defaultTrail="happytrails:hearts"
trails=[
    {
        ContentVersion=1
        id="happytrails:hearts"
        name=Hearts
        "particle_effect" {
            Options=[
                {
                    Option="minecraft:velocity"
                    Value {
                        x=0.5
                        y=1.0
                        z=0.4
                    }
                },
                {
                    Option="minecraft:quantity"
                    Value=7
                }
            ]
            Type="minecraft:heart"
        }
        period=10
        radius=30
    },
    {
        ContentVersion=1
        id="happytrails:villager_happy"
        name="Happy Villager"
        "particle_effect" {
            Options=[
                {
                    Option="minecraft:offset"
                    Value {
                        x=0.5
                        y=1.0
                        z=0.4
                    }
                },
                {
                    Option="minecraft:velocity"
                    Value {
                        x=0.5
                        y=1.0
                        z=0.4
                    }
                },
                {
                    Option="minecraft:quantity"
                    Value=13
                }
            ]
            Type="minecraft:happy_villager"
        }
        period=10
        radius=30
    },
    {
        ContentVersion=1
        id="happytrails:villager_storm"
        name="Stormy Villager"
        "particle_effect" {
            Options=[
                {
                    Option="minecraft:offset"
                    Value {
                        x=0.0
                        y=3.0
                        z=0.0
                    }
                },
                {
                    Option="minecraft:velocity"
                    Value {
                        x=0.0
                        y=0.1
                        z=0.0
                    }
                },
                {
                    Option="minecraft:quantity"
                    Value=5
                }
            ]
            Type="minecraft:angry_villager"
        }
        period=10
        radius=30
    },
    {
        ContentVersion=1
        id="happytrails:crit_strike"
        name="Critical Strike"
        "particle_effect" {
            Options=[
                {
                    Option="minecraft:color"
                    Value {
                        Blue=139
                        ContentVersion=1
                        Green=139
                        Red=0
                    }
                },
                {
                    Option="minecraft:offset"
                    Value {
                        x=10.0
                        y=3.0
                        z=10.0
                    }
                },
                {
                    Option="minecraft:quantity"
                    Value=10
                }
            ]
            Type="minecraft:critical_hit"
        }
        period=5
        radius=20
    },
    {
        ContentVersion=1
        id="happytrails:cloud"
        name=Clouds
        "particle_effect" {
            Options=[
                {
                    Option="minecraft:offset"
                    Value {
                        x=0.0
                        y=3.0
                        z=0.0
                    }
                },
                {
                    Option="minecraft:velocity"
                    Value {
                        x=0.01
                        y=0.01
                        z=0.01
                    }
                },
                {
                    Option="minecraft:quantity"
                    Value=2
                }
            ]
            Type="minecraft:cloud"
        }
        period=1
        radius=10
    }
]

Future Features

  • Dynamic trails that change with each time they are spawned (think rainbows)
  • Randomization of trails (using a trail that allows for random values to be set)
  • Creation of trails through commands with an in game menu system
  • Per trail permissions
  • Maybe allowing multiple trails to be set at once

Version History

Version Features / Changes Date
0.1.0
  • Configurable Trails
  • Trails have period duration and player range
July 9th, 2017
0.1.1
  • Per-trail permissions. The permission for the trail is based on the id of the trail after the plugin id. So, if the id is happytrails:villager_storm, the permission will be happytrails.trail.villager_storm
July 9th, 2017

happytrails's People

Contributors

gabizou avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

aiidoneus

happytrails's Issues

Keys are still being registered incorrectly

I updated the plugin to 0.1.4 and I still get an exception when starting.

When i trying to start my server minecraft in 1.12.2 SPONGE FORGE (7.1.0-BETA-3392 / Forge 14.23.4.2705)

I get this error :

[20:44:10] [Server thread/ERROR] [Sponge]: Could not pass SpongeGameRegistryRegisterEvent to Plugin{id=happytrails, name=HappyTrails, version=0.1.4, description=A fancy plugin making trails for players to use, url=https://gabizou.com/, authors=[gabizou], source=/var/directory_serv/minecraft_182843/./plugins/HappyTrails-0.1.4.jar}
java.lang.IllegalArgumentException: A plugin is trying to this.register custom keys under a different plugin id namespace! This is unsupported! The provided key: happytrails:trail
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[minecraft_server.1.12.2.jar:?]
	at org.spongepowered.common.registry.type.data.KeyRegistryModule.registerAdditionalCatalog(KeyRegistryModule.java:636) ~[KeyRegistryModule.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.type.data.KeyRegistryModule.registerAdditionalCatalog(KeyRegistryModule.java:65) ~[KeyRegistryModule.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.event.registry.SpongeGameRegistryRegisterEvent.register(SpongeGameRegistryRegisterEvent.java:59) ~[SpongeGameRegistryRegisterEvent.class:1.12.2-2705-7.1.0-BETA-3392]
	at com.gabizou.happytrails.HappyTrails.registerKeys(HappyTrails.java:138) ~[HappyTrails.class:?]
	at org.spongepowered.common.event.listener.RegisterListener_HappyTrails_registerKeys58.handle(Unknown Source) ~[?:?]
	at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:443) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:404) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:447) [SpongeEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:225) [SpongeImpl.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.SpongeGameRegistry.throwRegistryEvent(SpongeGameRegistry.java:609) [SpongeGameRegistry.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.SpongeGameRegistry.registerModulePhase(SpongeGameRegistry.java:535) [SpongeGameRegistry.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.SpongeGameRegistry.init(SpongeGameRegistry.java:564) [SpongeGameRegistry.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.SpongeMod.onInitialization(SpongeMod.java:384) [SpongeMod.class:1.12.2-2705-7.1.0-BETA-3392]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) [LoadController.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.redirect$onPost$zza000(LoadController.java:560) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?]
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:744) [Loader.class:?]
	at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107) [FMLServerHandler.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:337) [FMLCommonHandler.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:219) [nz.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]

Multiple effects in one trail

This is pretty self explanatory from the title, But is there a way to add multiple effects, for instance a smoke effect with a number of different colours to a trail? (Trying to sort something out for the server i'm a part of)

I HAVE A BIG ERROR...

Hello,

When i trying to start my server minecraft in 1.12.2 SPONGE FORGE (7.1.0-BETA-3392 / Forge 14.23.4.2705)

I get this error :

[20:44:10] [Server thread/ERROR] [Sponge]: Could not pass SpongeGameRegistryRegisterEvent to Plugin{id=happytrails, name=HappyTrails, version=0.1.4, description=A fancy plugin making trails for players to use, url=https://gabizou.com/, authors=[gabizou], source=/var/directory_serv/minecraft_182843/./plugins/HappyTrails-0.1.4.jar}
java.lang.IllegalArgumentException: A plugin is trying to this.register custom keys under a different plugin id namespace! This is unsupported! The provided key: happytrails:trail
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[minecraft_server.1.12.2.jar:?]
	at org.spongepowered.common.registry.type.data.KeyRegistryModule.registerAdditionalCatalog(KeyRegistryModule.java:636) ~[KeyRegistryModule.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.type.data.KeyRegistryModule.registerAdditionalCatalog(KeyRegistryModule.java:65) ~[KeyRegistryModule.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.event.registry.SpongeGameRegistryRegisterEvent.register(SpongeGameRegistryRegisterEvent.java:59) ~[SpongeGameRegistryRegisterEvent.class:1.12.2-2705-7.1.0-BETA-3392]
	at com.gabizou.happytrails.HappyTrails.registerKeys(HappyTrails.java:138) ~[HappyTrails.class:?]
	at org.spongepowered.common.event.listener.RegisterListener_HappyTrails_registerKeys58.handle(Unknown Source) ~[?:?]
	at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:443) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:404) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:447) [SpongeEventManager.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:225) [SpongeImpl.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.SpongeGameRegistry.throwRegistryEvent(SpongeGameRegistry.java:609) [SpongeGameRegistry.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.SpongeGameRegistry.registerModulePhase(SpongeGameRegistry.java:535) [SpongeGameRegistry.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.common.registry.SpongeGameRegistry.init(SpongeGameRegistry.java:564) [SpongeGameRegistry.class:1.12.2-2705-7.1.0-BETA-3392]
	at org.spongepowered.mod.SpongeMod.onInitialization(SpongeMod.java:384) [SpongeMod.class:1.12.2-2705-7.1.0-BETA-3392]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) [LoadController.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_72]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_72]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.redirect$onPost$zza000(LoadController.java:560) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?]
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:744) [Loader.class:?]
	at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107) [FMLServerHandler.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:337) [FMLCommonHandler.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:219) [nz.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]

Please HELP ME !
Thanks you in advance !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.