Addon [Deleted] SkUniversal

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Status
Not open for further replies.
I checked this addon out because I wanted to hook into GriefPrevention but I'm having a problem. I'm using:
code_language.skript:
right click:
  set {_id::*} to claims at location of clicked block
  send "%{_id::*}%"
and it works for normal claims but if I make a subdivided claim (using /subdivideclaims) inside a claim then I right click in the subdivided claim area the {_id::*} returns <none> while clicking outside the subdivided claim but still within the claim it returns 0 (the id of the claim)
 
I've been testing out the (0¦builder|1¦container|2¦access|3¦manager) trusted [players] (of|on) [G[rief]P[revention]] claim [with id] %number% syntax with this code:
code_language.skript:
right click:
  set {_id::*} to claims at location of clicked block
  loop {_id::*}:
    send "&c%builder trusted of claim loop-value%"
    send "&a%container trusted of claim loop-value%"
    send "&7%access trusted of claim loop-value%"
    send "&4%manager trusted of claim loop-value%"
and I've noticed another bug that seems to only be the case with subdivided claims, if you use that code and click an area that contains a subdivide and then the original claim every time you click it adds the same uuid it's really strange

3649d96049.png


this is also really rather annoying for what I'm trying to do as all I want to do is check if someone can build at a location and for that I need to check all builder, cointainer, access and manager trusted of a claim and then I also need to check the claim owner before the code can say they can build, can I please make a suggestion for you to add a condition like:
%player% has (0¦builder|1¦container|2¦access|3¦manager) trust (of|on) [G[rief]P[revention]] claim [with id] %number%. If I used this code though:
code_language.skript:
right click:
  player has builder trust of claim 1
  send "You can build at claim 1"
it shouldn't just work for players who have been trusted using /trust it should also work for players who own the claim and players who have /permissiontrust just like how if I did player has access trust of claim 1 if they also owned the claim, had builder trust, had permission trust or container trust it would still work
 
I'll look into that bug. But for just checking if a player can build at a location you can use skript's condition https://bensku.github.io/Skript/conditions.html#CondCanBuild. The trusted players expression isnt meant to take the place of that
that's intresting, didn't know griefprevention was supported. That will not actually work for me though as I'm making a farming script where you right click the crops and they auto replant and I want people to be able to do that with accesstrust but they will not have build permission if they only have access trust
 
im kinda confused what you want. Cant you just check if the player can build (skript condition) or if theyre in the access trusted players then let them replant if either of those are true

and i did find the problem with the uuids btw
 
Hey Donut

So im currently working on a GriefPrevention Real Estate type skript! Within this, i will need to call for claim ID's and claim types.
I have got it to work, to give me back ID's but when i try get types, basic claims work, sub claims run errors.

Here is my code for testing
code_language.skript:
command /claimtest:
    trigger:
        set {_claim::*} to the ID of GP claim at location of player
        loop {_claim::*}:
            send "%loop-value%" to player
            send "%the claim type of GP claim loop-value%" to player

On my MineCraft screen, when i run my command i get:
3
basic
4
An internal error occurred while attempting to perform this command.

This is the error in my console:
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! [Skript] Severe Error:
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! Something went horribly wrong with Skript.
[12:28:20 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[12:28:20 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[12:28:20 ERROR]: #!#! Here is full list of them:
[12:28:20 ERROR]: #!#! skRayFall (http://sk.rayfall.net/) TuSKe (github.com/Tuke-Nuke/TuSKe) skDragon skUtilities (https://tim740.github.io/) SkStuff skript-yaml SkQuery Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/) SkUniversal SharpSK
[12:28:20 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[12:28:20 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[12:28:20 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[12:28:20 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[12:28:20 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[12:28:20 ERROR]: #!#! Only if the author tells you to do so, report it as Skript issue (url below)
[12:28:20 ERROR]: #!#! Issue tracker: https://github.com/bensku/Skript/issues (only if you know what you're doing!)
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! Stack trace:
[12:28:20 ERROR]: #!#! java.lang.NullPointerException
[12:28:20 ERROR]: #!#! at us._donut_.skuniversal.griefprevention.ExprClaimType.get(ExprClaimType.java:51)
[12:28:20 ERROR]: #!#! at us._donut_.skuniversal.griefprevention.ExprClaimType.get(ExprClaimType.java:17)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.VariableString.toUnformattedString(VariableString.java:475)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.VariableString.getMessageComponents(VariableString.java:490)
[12:28:20 ERROR]: #!#! at ch.njol.skript.effects.EffMessage.execute(EffMessage.java:86)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[12:28:20 ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)
[12:28:20 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:279)
[12:28:20 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:236)
[12:28:20 ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:255)
[12:28:20 ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:170)
[12:28:20 ERROR]: #!#! at jdk.internal.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
[12:28:20 ERROR]: #!#! at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:28:20 ERROR]: #!#! at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[12:28:20 ERROR]: #!#! at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
[12:28:20 ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[12:28:20 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500)
[12:28:20 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1389)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1232)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[12:28:20 ERROR]: #!#! at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
[12:28:20 ERROR]: #!#! at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
[12:28:20 ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
[12:28:20 ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:844)
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! Version Information:
[12:28:20 ERROR]: #!#! Skript: 2.2-dev34 (latest)
[12:28:20 ERROR]: #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT
[12:28:20 ERROR]: #!#! Minecraft: 1.12.2
[12:28:20 ERROR]: #!#! Java: 9.0.1 (Java HotSpot(TM) 64-Bit Server VM 9.0.1+11)
[12:28:20 ERROR]: #!#! OS: Mac OS X x86_64 10.12.6
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! Server platform: Spigot
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! Current node: null
[12:28:20 ERROR]: #!#! Current item: send "%type of claim with id null%" to the player
[12:28:20 ERROR]: #!#! Thread: Server thread
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! Language: english
[12:28:20 ERROR]: #!#! Link parse mode: DISABLED
[12:28:20 ERROR]: #!#!
[12:28:20 ERROR]: #!#! End of Error.
[12:28:20 ERROR]: #!#!
 
can you just broadcast {_claim::*} and post what it says
Ok, standing inside a claim, I use this code
code_language.skript:
command /claimbroadcast:
    trigger:
        set {_claim::*} to the ID of GP claim at location of player
        broadcast "%{_claim::*}%"
And this is the outcome
[22:32:53 INFO]: 3 and 4
 
@ShaneBolenback
i found the problem, ill be updating later today. this will also include the slimefun item syntax btw. I didnt add the create item effect yet because i need more time to think exactly how i want to implement the effect since theres a significant amount of stuff i need to account for but i definitely will sometime, i just wanted to release the update asap with at least the basic expression
 
Donut updated SkUniversal with a new update entry:

Version 2.1

- Fixed issue with the GriefPrevention trusted players expression
- Fixed issue with using sub-claim IDs in GriefPrevention expressions

- PlotSquared additions: set flag effect, remove flag effect, plot flags expression, and flag value expression

- Added a couple Slimefun expressions; more coming in the next update

Read the rest of this update entry...
 
Ah thats funny, i went to the wiki page and it didn't show in the list, but i didn't think to click on the sidebar on the right and see it there, DUR...
But thanks, This helps me a lot! Really appreciate it!
 
Status
Not open for further replies.