#help-archived
1 messages · Page 123 of 1
like with longer range than vanilla
that is why theres that thing up top
yeah I get it
and if it isn't an instance of itemframe
return
nothing
of course
and it will move on
until it finds that specific
itemframe and gets the custom name
though
Idk what event you would fire that on it sounds like it needs to constantly run
yeah you could set a bukkittask for each player
onlogin
or bukkitrunnable I mean
this is only for the admins
then check for a permission
or store a hashmap with player settings
when they toggle it on though
or make a playerdata config file
it will let them know the img name
yeah
lemme see if that could work brb
for some reason it won't let me
List<Entity> nearbyE = plugin.player```
it won't let me do that last bit @quartz trench
which is weird
I defined the player as a sender
Your trying to set a List of Entity to a Player object, of course it wont work
You want to make that void method you sent return an entity
and take a player
and then use that method in your command
AnimatedFramesPlugin plugin;
public ImgIdentifierCommand(AnimatedFramesPlugin plugin) {
this.plugin = plugin;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player){
Player player = (Player) sender;
List<Entity> nearbyEntities = plugin.
}else{
System.out.println("you cannot run this command!");
}
but u can get a list of entities from a player obect
heres my full code @quartz trench
so
how would I define player?
right now i'm using a public boolean
Not to be rude but it doesn't seem you know much Java
not a public boid
i know
just go on
this is stuff i haven't been taught yet
so i'm trying to not die right now out of boredom figuring out why this code won't work for hours
so
plz just help
You need to learn at least a little more to be able to code a plugin
I'm not going to spoonfeed code
I gave some useful suggestions as did X AE
^ @fleet crane non coerced testimony of why I should get staff over @radiant hollow
That’s sad
Your plugin doesn't have gender support and is therefore sexist
it's not sexist as it's equally abusive to everyone
The last time I pinged wiz, I was kicked from paper
u fken deserved it, bich
I just wanted a fast response, I mean no one was talking to me
I kinda needed that spoon fed help anyways
lmao that wouldve taken 2 mins of googling
That’s what I should of done xD
that's... uh
so im useing economy++ puligin on 1.12.2 but the problem im having is that it keeps giving me and error code saying An internal error occurred while attempting to performe this command when ever i try to use the /jobs command
could anybody help me with that?
Does anyone know off the top of their head how to turn a bukkit item entity into a nms one?
nvm
i figured it out right as a i sent it
as one does
does anyone know how to create a boolean that can access all java classes?
? wym
er.... a boolean is a data type, specifically true or false... It has no way to access classes. What are you trying to do @strange grove ?
I strongly recommend you learn more about basic java before you continue writing plugins
How can I make my custom trait created with CitizensAPI save through restarts?
I tried using onSpawn in the trait and I did a event for npc spawn too
neither were called
I could use an iterator I guess
yeah didnt work
@buoyant path
@Persist("mysettingname")
boolean automaticallyPersistedSetting = true;
String items;
@Override
public void load(DataKey key) {
this.items = key.getString("key");
}
// Save settings for this NPC (optional). These values will be persisted to the
// Citizens saves file
@Override
public void save(DataKey key) {
key.setRaw("key", "value");
}
Traits are persistent by default in citizens, but this is how you would store data
Idk
I don't believe its saving my trait
Are you registering it properly?
CitizensAPI.getTraitFactory().registerTrait(TraitInfo.create(Trait.class).withName("trait"));
Trait.class, "trait",
public Trait() {
super("trait");
}
"trait" same name here
oh
Citizen traits should be persistent
ok
Is there a way to check if its registered that way im not registering it again each time for no reason
You only register it one time. When your plugin gets enabled. As for why.. Because the server doesn't know about it otherwise.
I understand now they store the name of it with the npc and then wait for all dependencies to load before doing the npcs
craftingslots: [10, 11, 12, 19, 20, 21, 28, 29, 30]
How do I keep this in eclipse after pressing ctrl + shift + f to format the code?
Anyone know how to use 3rd party dependencies with maven?
https://dev.bukkit.org/projects/worldguard-region-events as an example just add it to my libraries and that's it?
Got it.
@frigid ember In intelliJ it's in my code formatting settings, I would assume it's similar in eclipse. Something like collapse when long/collapse always/never collapse should be there
These are the only options I see for YAML formatting
Does anybody know which blocks are affected by the event EntityDamageByBlockEvent, and then the BLOCK_EXPLOSION cause?
I know for sure beds are one of them
but are there more?
I'm pretty sure anything that extends or implements the Block object I'd assume.
Literally affected, would be anything but AIR, OBISIDIAN, and BEDROCK.
and anything Liquid.
Hmm, ill need a way to link that to a player then, possible the blockexplodeevent is called before the entity damage
but sure i think that would work
Or you know what?
I think it's actually found in the PlayerEnterSleepEvent
PlayerBedEnterEvent*
Not sure if the explosion occurs because of BlockExplode or that one ^
hmm thats another one indeed I need to check out
i dont know if its called when the bed explodes
but thanks! :)
Players entering beds in Nether is cancelled, but I personally believe it's because of the BedEnter, although I didn't make Spigot I'd assume that's a pretty close branch.
/ link towards it, if not check PlayerInteractEvent
@bronze marten suffocation, lava, water, magma
ok then I think EntityDamageByBlockEvent + DamageCause.BLOCK_EXPLOSION is always a bed in the nether
BlockExplodeEvent is called, but somehow the block is AIR lol
whenever it explodes so thats no use
and PlayerBedEnterEvent is not called when a bed explodes
I can't access setCancelled in CreatureSpawnEvents when using Kotlin, am I missing something? Should I report it as an issue?
I am just making a method in Java to call it from Kotlin to resolve the issue, so it's not a big deal
Hello everyone! My JAR files are over 30mb, but I feel like they shouldn't take up that much space. I see other plugins only taking up 3-4 mb. I fear that the spigot library is getting included in each one. If that's the case, how do I not include the Spigot Library in the JAR file? I'm using intelliJ to build the project. Any advice would be greatly appreciated :)
Use gradle and use the shadow plugin to shade in what you want
Lol
@rotund orbit You either use Maven and Gradle
using the proper scope will not include them
for gradle is 'compileOnly'
for maven is 'provided'
Is it possible to convert a Java Project to a Maven/Gradle project? Or do I have to start a new project and copy my code over?
Also, I'm not sure exactly what maven/gradle are in the scope of programming. What is their purpose exactly?
Yeah I do
there is a plugin called "Minecraft Development" by DemonWav
which automatically does the maven config for you
Maven and Gradle is helping you to manage your dependencies basically
Gradle is a little more advanced, but is faster
well inside the gradle build you're actually writing code
while inside the maven config
it's just a config
I appreciate your help and explanation, thank you. So if I just change my config file with this Minecraft Development plugin, it won't be 30mb anymore?
Well firstly, generally requiring less lines with gradle than maven
DanTheTechMan are you using any external library in your project?
(other than spigot)
Nope only spigot
yeah then it should get to like 100KB
Aw hell yeah
really depends on how much have you written
Though I think you can shade out dependencies w/o gradle or maven?
I made a custom factions plugin
well it's not required for spigot
What is shading?
well
you put someone's else library into your final product
and you also relocate them usually
so they end up in your package
an example from my plugin
For instance we don’t need to include the spigot jar in our jarfile as a plugin will have that loaded on runtime anyways
I think that's my issue
In maven you can set minimizeJar and it won't include unused classes from dependancies as well
there's a guide
Oh yeah?
Thanks so much :)
yeah I really like helping people switch from ANT to Maven\Gradle
I don't know about porting your project tho
i think you might have to create another one
and copy your stuff into it
yeah do that
Ahhh
use the intelliJ plugin to create a template project with a pom.xml that includes spigot already
and I think it will set the scope to provided as well which means do not include the dependancy in the jar
I'll give it a shot
Minecraft Development plugin also lets you choose the version
yeah thats the plugin im referencing
Do I have to use that plugin or can I just follow this tutorial?
Never did a plugin in intelliJ before lol
Oh a market huh I'll take a look
Oh I see
Thank you
Sorry
I installed it, now where can I actually interact with it in IntelliJ?
Oh cool!
Then you can either choose Bukkit , Spigot, Paper
Aw this is great
Hi all! can someone help me, i have proble with buildtools setup. i open gitbash and put the commands that are needed, it loads something put then stops, lefting only these in the folder: Bukkit, work Buildtools.jar and BuildTools.log.txt
What error is it giving
Starting clone of https://hub.spigotmc.org/stash/scm/spigot/bukkit.git to Bukkit
Exception in thread "main" org.eclipse.jgit.api.errors.TransportException: https://hub.spigotmc.org/stash/scm/spigot/bukkit.git: cannot open git-upload-pack
$ Exception in thread "main" org.eclipse.jgit.api.errors.TransportException: https://hub.spigotmc.org/stash/scm/spigot/bukkit.git: cannot open git-upload-pack
bash: Exception: command not found
I mean having a big jar can happen, but if you avoid it it's better
I have a JAR that is 1.9MB because I'm using lot of external libraries
I have a jar that’s 23mb
For some data and communication related deps
But the rest of them are sub 1mb cause they all just depend on the core
Caused by: java.lang.IllegalArgumentException: Cannot find field with type interface io.netty.channel.Channel ?
now i get this Maven does not exist, downloading. Please wait.
Starting download of https://static.spigotmc.org/maven/apache-maven-3.6.0-bin.zip
Exception in thread "main" java.net.UnknownHostException: static.spigotmc.org. After that nothing happens anymore
Yeah i built spigot yesterday
I just downloaded the zip maven failed to download
a DNS lookup failed
If it helps, at least part of your problem is dns isn’t resolving
But that’s typically a result of another networking failure
Unless you already know what you’re doing, in which case you wouldn’t be asking here, your dns is likely coupled tightly with the availability of the rest of your home network
Is someone able to help me a little with a very small SQL thing again? 🤣 I swear i tried google but I'm either using the wrong terms, or not finding anything
Don’t ask to ask, just ask
I'm doing a multiple UPDATE SET, but I have no idea of how would i replace a column value with one of the values that have been given from the prepared statement
player_name doesn't seem to update here
Where clause
You need a “where x=y”
Or you’ll update the entire database
And your player name = player name is doing literally nothing
well the fact
is that i'm inside an ON CONFLICT
so i'd need to set the row that is conflicting
What’s the exact error message?
Does it just not update?
well because i'm passing a new one
No you’re not. In that update you’re essentially doing “set x to the value of x”
The query parser literally optimizes thst away, it does nothing
You need to set it to the parameter you’re using in your prepared statement.
Not itself.
ohhh wait i think i remember now the correct syntax
Also it’s general good sql practice to specify table and column names by surrounding them in backticks
oh they weren't doing that in the tutorial im following
It’s not technically necessary but when you start to write more complex sql queries then it’ll make things more obvious
Now that I'm using Maven none of my plugins work and I get the error message that my api version 1.15.2 is unsupported.
I went and changed api-version in all my plugin.yml files and same result.
Are your plugins well compiled?
Well compiled?
Remove the plugins already present in your plugins folder and recompile them
I'll try again
Same problem
@undone narwhal here is my plugin.yml file
my pom.xml referenecs 1.15.2-R0.1-SNAPSHOT
Have you tried deleting the plugins in the plugins folder and re compile it?
Yeah I deleted the plugin JARs and re-built the projects, and then moved the new JARs into the plugins folder
Open your compiled jar with winrar or winzip or any other zip software
and chec kthe plugin.yml inside
With an Artifact
oh
clean package
how do I do that?
What's the command to build it with maven?
mvn clean package
but it should be already generated by the Minecraft Dev. plugin
you just gotta select it
from IntelliJ
Edit Configurations ... > Maven > and select the one that should be already present
then you build with the arrow button
Guys how can i add this code on my server? With coding eclipse ?
amazingly I am still getting the same error
I wonder if I just messed something up when creating the project...
the path is also messed up oh man
It's like its not looking at my plugin.yml at all
I'd say you probably need to use an ItemStack for that, but I'm not sure
hi I would have a problem when I put the dependencies of worldguard intellij idea makes this error when I compile it
Extrslimo i just paste it or?
Old one. İ Want to auto Equip armor
When players buy armor
I'm just going to upload the old 30mb plugin JARs again because I can't figure this out rn
İts so hard i think :D i dont know coding :/ @proud furnace
@rotund orbit yooo
no dont do 30MB JARs
are you building with 'clean package' ?
with this button
Hello, I'm new creating plugins and I don't know how to make a plugin functional, I use intelj and for now I only have it to start and shutdown, I want to put so that when a person enters the console says something to experience a little someone Spanish could help?
I did not understand -.-
yeah I was @sturdy oar
but for some reason it seems to be ignoring the plugin.yml and grabbing the version and main path from somewhere else
you are getting the jar from /target right
yeah
Yeah it is but not since I transferred to Maven
or try refreshing intelliJ maybe
yeah maybe intelliJ needs a restart
Link on Github
https://github.com/Kingdom-Programmers/Medieval-Factions
can you push the pom.xml
I'll try that
well maven when you get it to work properly is wonderful. It can do weird stuff sometime
I've had a few bugs in the past as well
I have this What do I do if I want to make a plugin the tutorials stay here
Register event handlers in onEnable
I'm new at this
y gp to spigot-api?
well yeah you gotta learn the bukkit API
also we've got no idea of what you're trying to achieve
That when a person enters a text comes out in the chat
That page I linked will tell you exactly how to do that
You want to listen to PlayerJoinEvent
@sturdy oar tried connecting to the repo and now my push is getting rejected
haha
I appreciate you trying, I'll see if I can get it working
I may ask a stuid question, have you copied 2 plugin.yml by any chance lol
git commit -m 'commit message'
@sturdy oar now but I don't know what I have to put, I don't know if I have to put this: org.spigotmc.event.player or this: PlayerSpawnLocationEvent (@NotNull Player who, @NotNull Location spawnLocation)
wow thanks
lol
I'm not 100% sure of this, but I think that with the Minecraft Dev plugin you'll want to have a structure like this
thats correct
i have this
oh
ITS IN RESOURCES?
yeah
I put my plugin.yml in src lol
you made changes to the remote repo then is that error
i have this
@frigid ember thas is correct?
ITS IN RESOURCES?
@rotund orbit oof
it said to fetch first
yeah
it seems I'm having all sorts of problems here
I still do not know what I have to put to put something in the chat when someone enters the server?
use the vcs gui in intellij
I don't think I've tried to do it this way, normally I import from version control
You will probably need to rollback local changes then pull from master
and make changes
then push
the version control button is next to the console button on the bottom
deleting your local repository (or backing it up somewhere else) and cloning again will work
could also learn how to use git to resolve it properly
I should know how to use git by now but its so confusing lol
Here's a question: How do I connect this local repo to my github repo...?
I don't think I did that correctly
looks correct 🤔
then it tells me no tracked branch configure dfor branch master
Have you tried using the IntelliJ git gui
deleting your local repository (or backing it up somewhere else) and cloning again will work
probably do this
git branch --set-upstream master origin/master
inb4 github repository gone
🙏
this is one of the most confusing moments I've ever had
Alright looks like the plugins are working again, its just that I can't connect them to Github.
Thanks for the help guys I appreciate it 🙂
I need help I made A score board that is showing on the right. But That scoreboard needs to be reloaded every sec
oke explanation about my code
RED > Scoreboard on the right of your screen
GREEN > Luckperms prefix gethering
BLUE > eco gethering
ORANGE > Date and time gethering
How do i get a material from a integrer? getMaterial(String name) Wants a string.
Or do i have to set the numbers myself?
Hi I'm trying to set up Spigot development for VS Code, It's telling me to install an OpenJDK. Do i download the latest one or JDK 8 as I've thats the most popular for plugin development
I'd suggest using IntelliJ community instead of VS Code, and depends on your version, IIRC Java 8 is most widely used but you can use latest assuming the server is using latest.
i'd suggest using what you want and jdk 8
pretty sure jdk 7 is just java 7 which means no streams, no lambda
so someone just UUID spoofed my server using something called cheatmine.... has anyone heard of it/know a way to stop it?
F
I dont need F I just need a way to stop it
ooft
# If a player change his nickname, you have to change his information manually!
@frigid ember I wouldn't recommend that lol
I just don't think it's something you can do
and doesn't online mode fix the whole problem @wind dock ?
@raven stag VS code is closer to notepad++ than it is to an IDE
I 100% suggest IntelliJ IDEA or, god forbid, eclipse
or you can still use what you want 🙂
How can I reload / update a void like public void scoreboard(Player player);
stop hating eclipse lol
maybe it sound weard but how?
god forbid, eclipse
@tiny dagger still thanks for your help man
again, most people wouldn't have even mentioned it's existence lol
https://paste.md-5.net @south shoal
which issue did you had?
oh
@tiny dagger why you use eclipse > intellij anyway lol
So I need to paste my code in?
save it and send a link
are you getting out of it or not XD
you didnt' send a link
send it in DM
https://paste.md-5.net/lisepugitu.java this is the link
did it work?
@stone rampart
Well @hollow thorn I made a scoreboard that link that you see I send and I want to reload / update it every sec how can I do that?
bukkitrunnables
https://www.spigotmc.org/threads/syncing-saving-data-across-servers-on-a-network.443962/
Hey, if anyone has any ideas on syncing data across a Bungee network please check that out if you get a chance, ty!
You can edit it and resent the link @hollow thorn
erm no
hahah ok than not lol
thats kind of not how spigot works
and also i use alot of features which are in my own editor
so basicly you start with
new BukkitRunnable(){
@Override
new public void run(){
//TODO
}.runTaskTimer(0L,20L)
and that will create an event that runs every tick
ok and how can I call my public void Scoreboard(Player player)
in that runnable
sound stupid that i don;t know
some how it does not work
lol
Basically, I was using a gadget, and then the server crashed, but the block is stuck there, it can't be broken, you can't stand on it, and you just fly through it.
https://gyazo.com/1cb6d7de3bbba3c0a6f4615c30f3a0fc
Any help would be appreciated.
no everyone can see it
I tried it on my alts
looks like the worldedit fixed it
tysm
Pom Error Failed to read artifact descriptor for org.spigotmc:spigot:jar:1.15
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
I'm not even using 1.15
of course i know that
🤔
Well I need help
I don't get it anny more
I hace tryed more that 1 thing
like 10 thing
and it does not work
Whoe can help me with a reload / update timer that updates scoreboard every sec code is on this link https://paste.md-5.net/lisepugitu.java
I know there are some other help request first but I don't know when the right moment is to post my problem.
Hello I am quite new to spigot and have some problem with the installation on my Server with BuildTools.jar. I already read the tokens and could not find a solution for my problem. That is the error message:
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java, -jar, BuildData/bin/SpecialSource-2.jar, map, -i, work/minecraft_server.1.12.2.jar, -m, BuildData/mappings/bukkit-1.12.2-cl.csrg, -o, work/mapped.cf6b1333.jar-cl] at org.spigotmc.builder.Builder.runProcess0(Builder.java:805) at org.spigotmc.builder.Builder.runProcess(Builder.java:742) at org.spigotmc.builder.Builder.main(Builder.java:428) at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:40)
what?
in the consle of your server
ther need to bed under that line a caused by: ..........
Nope there isn't a caused by
so there are that there is in "main" and a error in a command that you are running
I dont run any other commands it is a fresh os and I only followed the Installation Guideline
HI
i was wondering
could you send a link for the worldedit plugin
i can't find it anywere
lul
if i search it it just gives me comments
I think I going to ask my question later again...
https://dev.bukkit.org/projects/worldedit/files
@sturdy oar Do you have a spigot link?
what recommended ram if running a bungee?
alri thx
Ok so my sever is spigot i need spigot plugins
ok
how do i apply velocity to entities
Entity#setVelocity?
@Override
public void run(){
for(World w: Bukkit.getServer().getWorlds()){
for(Entity turret: w.getEntities()){
if(turret.getScoreboardTags().contains("turret")) {
for(Entity ent: turret.getNearbyEntities(5, 5, 5)){
if(ent instanceof Monster){
Location loc = turret.getLocation();
turret.teleport(loc.setDirection(ent.getLocation().subtract(loc).toVector()));
Location loc2 = turret.getLocation();
loc2.add(loc2);
Egg ee = loc2.getWorld().spawn(loc2, Egg.class);
ee.teleport(loc2);
ee.setShooter((ProjectileSource) turret);
Vector y = turret.getLocation().getDirection();
int x = 40;
ee.setVelocity(y.multiply(x/20));
}}
}
}
}
}
}.runTaskTimer(this, 0L, 20L);```
I made this but I get a error on the reload thing how can I fix it
remove the Bukkit runTaskTimer =
it removes the run
i put that there to ask if it would work
@Override public void run(){ for(World w: Bukkit.getServer().getWorlds()){ for(Entity turret: w.getEntities()){ if(turret.getScoreboardTags().contains("turret")) { for(Entity ent: turret.getNearbyEntities(5, 5, 5)){ if(ent instanceof Monster){ Location loc = turret.getLocation(); turret.teleport(loc.setDirection(ent.getLocation().subtract(loc).toVector())); Location loc2 = turret.getLocation(); loc2.add(loc2); Egg ee = loc2.getWorld().spawn(loc2, Egg.class); ee.teleport(loc2); ee.setShooter((ProjectileSource) turret); Vector y = turret.getLocation().getDirection(); int x = 40; ee.setVelocity(y.multiply(x/20)); }} } } } } }.runTaskTimer(this, 0L, 20L);```
@hollow thorn can i have some help with this
does anyone know how to setup a boolean that can be accessed through all java classes?
so in the main?
yeah
ok
you have to import it to use it in other files though
@hollow thorn Now I got more errors
private final boolean weed = false;
thx man
brb
if I have problems
then i do link my class
to the main class
correct?
just checkin
wut?
@hollow thorn Now I got more errors
@south shoal what are those errors
you make it in the main
you import it
import static [main].weed;
well all kinds of things
can you send them here
to man to mention
send the first one
The ovverride could not be there
so i delete that
the seccond one
- event can not be resolved
have you imported bukkit runnable
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
hey not to bother you much more @hollow thorn
but
it's not taking in the main class
import static org.inventivetalent.animatedframes.AnimatedFramesPlugin.showimgName;
ah
Saw that boolean weed
you forgot to put new BukkitRunnable(){
Exposed😂
at the start
wait who?
@south shoal
Saw that boolean weed
@vernal spruce for me the variable weed is common
720289869166936115
ok
Dang
Now this error lol
show the edited code @south shoal
the only problem
@south shoal put .runTaskTimer() on the end of the next bracket
is now ashamed
well now I need help to mention the public void createBoard(Player player) { how can I mention that in the runable?
just put the code in the run()
you might actually want to add them to a public variable
sure do your thing
public static boolean showImgName = false;
this is what i put in main
but
it now lets me import
o ok thanks @hollow thorn
the only problem
is that if i do import it
it turns grey which is weird @hollow thorn
here's how I import itr
import static org.inventivetalent.animatedframes.AnimatedFramesPlugin.showImgName;
but it all turns
grey
which is weird
mabye it means that its used
hmm
i've already put the improt in the class i want it in
and that thing up there
instead of final
i sput static
have you tried running it to see what happens
new BukkitRunnable(){
@Override
public void run(){
for(World w: Bukkit.getServer().getWorlds()){
for(Entity turret: w.getEntities()){
if(turret.getScoreboardTags().contains("turret")) {
for(Entity ent: turret.getNearbyEntities(5, 5, 5)){
if(ent instanceof Monster){
Location loc = turret.getLocation();
turret.teleport(loc.setDirection(ent.getLocation().subtract(loc).toVector()));
Location loc2 = turret.getLocation();
loc2.add(loc2);
Egg ee = loc2.getWorld().spawn(loc2, Egg.class);
ee.teleport(loc2);
ee.setShooter((ProjectileSource) turret);
Vector y = turret.getLocation().getDirection();
int x = 40;
ee.setVelocity(y.multiply(x/20));
}}
}
}
}
}
}.runTaskTimer(this, 0L, 20L);
This runs
But it doesnt spawn egg
Why do people instantiate BukkitRunnables in 2020
why not
have you ever heard of lambda expressions?
🤦
@Override
public void run(){
for(World w: Bukkit.getServer().getWorlds()){
for(Entity turret: w.getEntities()){
if(turret.getScoreboardTags().contains("turret")) {
for(Entity ent: turret.getNearbyEntities(5, 5, 5)){
if(ent instanceof Monster){
Location loc = turret.getLocation();
turret.teleport(loc.setDirection(ent.getLocation().subtract(loc).toVector()));
Location loc2 = turret.getLocation();
loc2.add(loc2);
Egg ee = loc2.getWorld().spawn(loc2, Egg.class);
ee.teleport(loc2);
ee.setShooter((ProjectileSource) turret);
Vector y = turret.getLocation().getDirection();
int x = 40;
ee.setVelocity(y.multiply(x/20));
}}
}
}
}
}
}.runTaskTimer(this, 0L, 20L);```
why doesnt egg spawn
hey @hollow thorn
you were right
it wasn't being used
that's why it was grey
i look over the smallest things lol
your a lifesaver man
thx so much!
🙂
happy headcrab noises
🙂
@hollow thorn I loaded the plugin but it does not work lol
what happens
it does not refresh every sec
nvrm mind put the old verion in
@Override public void run(){ for(World w: Bukkit.getServer().getWorlds()){ for(Entity turret: w.getEntities()){ if(turret.getScoreboardTags().contains("turret")) { for(Entity ent: turret.getNearbyEntities(5, 5, 5)){ if(ent instanceof Monster){ Location loc = turret.getLocation(); turret.teleport(loc.setDirection(ent.getLocation().subtract(loc).toVector())); Location loc2 = turret.getLocation(); loc2.add(loc2); Egg ee = loc2.getWorld().spawn(loc2, Egg.class); ee.teleport(loc2); ee.setShooter((ProjectileSource) turret); Vector y = turret.getLocation().getDirection(); int x = 40; ee.setVelocity(y.multiply(x/20)); }} } } } } }.runTaskTimer(this, 0L, 20L);```
why doesnt the egg spawn
Well forgot a line of text that you editet in but get a error on event.getPlayer()
probably because event
is undefined
you would have to do something to either get a certain player
or get all players
how can I define event than?
you would have to put it in the event thing
but that would result in problems
i guess
you could make a public static Event;
and then store it there
as in public static PlayerJoinEvent;
Maybe a weard question but can you make a exmple or set it in my code?
because this is all new for me lol
ok
Does anybody know how a spawner determines the location to spawn a mob?
How can i get a material with just a id?
1.12.2 -> Material.getMaterial(id)
ah ok thx
I am trying to change the default faction power. Which file is this in the "Factions" plugin?
how do i get the closest entity
I am trying to change the default faction power. Which file is this in the "Factions" plugin?
@frigid ember would be named FActions
in the plugin
folder
@frigid ember Probably the config.yml or settings.yml. Something like that. I'd read the documentation.
How can i change Knockback in PVP?
😐
@hollow thorn I need help I can't figure it out how to make it so event.player() does work
so you have the global variable
you just use that
so if the global variable was e
use e.getPLayer();
how do i get the closest entity
@hollow thorn
What. E isn’t in scope. Probably because e never existed.
nothing I think lol
then you need to make e
public PlayerJoinEvent e;
this creates a variable
called e
Please. I’ve said this many times but. Please learn java at least SOMEWHAT before attempting to use the spigot api. It’s a very big and daunting task, and the spigot api is quite complicated for a beginner to follow.
so in onEnable
@south shoal out of it
Are you trying to do something when a player joins?
You need to make an event listener and handle the event
You can’t just reference an event without it being called, how would that even work logically speaking
I have made more than 15 plugins that work more than good on 1.15.2 But I haven't made one in lika a year and learned a whole other coding program / language
You very clearly don’t understand java well at all
Java is an object oriented programming language where scope matters. It’s very different from other languages like python, which most people “learn” without touching objects.
You don’t want a timer, you want a join event handler I think
Or do you want to run some function for all online players?
I have a scoreboard that shows dat, time, eco and rank that needs to be up to date
Ok so in your timer, loop over all players
if this is not up to date it is just weard
And run the function on each of them
I need help, I have an enchantment table at spawn. How do I make it so that lapis is in it every time it is opened?
Use a foreach loop just like you did at the beginning
And also you don’t need the conditional statement.
@frigid ember InventoryOpenEvent
Filter for enchantment tables, cast, and update the inventory.
so I will make a online code boc so you can see my code and if you can / want edit it in
I’m not writing your code for you
ok that is good
I’m also not spoon feeding anybody.
What file is that?
Like I said before, loop all of your players and update the objectives for each of them
@frigid ember oh I thought you were trying to make a plugin. I don’t know any plugins that do that but they probably exist.
@frigid ember https://www.spigotmc.org/resources/autolapis.3206/
You can probably use region-based permissions to do it
You’ve tried it?
Hey! Does anyone use the Spiget.org API? I'm having trouble retrieving a resource
https://www.spigotmc.org/resources/74999/ Here's the resource on spigotmc.org
but the Spiget API doesn't wanna work: https://api.spiget.org/v2/resources/74999
looks like a spiget / spigot issue
not working for any resource right now
ie plotsquared
The weird thing is that Spiget seems to work for one of my premium resources: https://api.spiget.org/v2/resources/63848/ (https://www.spigotmc.org/resources/63848/ on Spigot)
spiget uses spigots api
@hoary parcel Oo thanks... unfortunately it doesn't have the description included, though
Unless I'm missing something
That's where I'm lost
Hi. Does anyone have good experience with Bungeecord? Really struggling to get it started. The config.yml will not appear for some reason
I want to make a pickaxe that makes no sound when mining. How would I go about that?
Hi. Does anyone have good experience with Bungeecord? Really struggling to get it started. The config.yml will not appear for some reason
@vivid valley
Does bungeecord require you to sign the EULA?
Also wrong server for that :/
BungeeCord doesn't require EULA's to my knowledge.
Huh. Dang.
Any good 1.15 Skyblock plug-ins our there (free)?
Iridum or aSkyblock but both have issues.
@vivid valley any more information you can provide on that issue?
Listen to the BlockDamageEvent``` Thank you! I read somewhere that sound is clientside; is that still the case?
It solely depends.
You can set the Material Type of a block prematurely before it actually registers in a way?
Is it possible to use a custom structure nbt file when a player does a /create in Skyblock?
Skyblock cores usually use schematics to paste it in, so I'd assume WorldEdit has some way of storing NBT data in the .schem file I'd assume.
BlockDamageEvent or PlayerInteractEvent @acoustic temple
However completely eliminating sound is merely impossible to my knowledge.
@frigid ember Do you have more information on using custom islands in a Skyblock pack? I have a custom island using villagers as trading but can’t figure out how each player will have their own island
Alright, thank you!
my plugin keeps on getting old errors from other plugins
even though i keep cloning?
any Idea's?
because it did not have any errors with the commands i implemented before
and i've been racking my brain just to figure this out
so i would appreciate the help
Post isseus / st's
Like we all said yesterday
You have null pointer exceptions in Commands.java
It's really not
It's confusing for a person who doesn't know java maybe but
And yet here we are
it was a new peice of code
Link the repo
Caused by: java.lang.NullPointerException
at org.inventivetalent.animatedframes.Commands.frameCreate(Commands.java:163) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:161) ~[?:?]
at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:401) ~[?:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot.jar:git-Spigot-2040c4c-a1a705e]
... 16 more
Point out those lines.
ok
You made modifications
yes
Line 163 in Commands.java is an @Override annotation, it's impossible to get an NPE on that line
Show us some code.
i litreally did not touch it
Yes you must have touched it
There is no possible way you're running the code you linked
It's impossible.
...
You have made modifications to Commands.java
Please send the modifications you made
maybe post the whole fucking class so we can see line numbers
Show us the class with Commands that's throwing / calling the NPE.
@strange grove We have been over this exact problem for 2 days in a row
All times we request information you provide only partial information, rarely enough to actually help
Still waiting on you to just CTRL+A, CTRL+C, and paste it.
That code looks jumbled to my eyes..
So MAYBE we have a shot at helping
yeah
Please re-generate the error with that exact class
Once you've done that, send over the Commands.class
and
I'm going to send you the code in my replace
command
also another thing to note
is the fact that if I add a new java class
it gives me this error
the one your looking at righht now
there is the code for replace
I know
is in the FUCKING COMMANDS.JAVA CLASS
i'm going to clone it
Has NOTHING to do with that class
just a sec
this is the code
but this is if i don't put in the replace command
in a diffrent java class
hey guys, this is about buycraft, but im in a bit of a dillema
So I bought this rank for about 7 bucks on this server
can anyone help me pls
Anyone knows how to disable
the world border teleporting you back or knoback?
when you hit it
and they promised some stuff they didnt deliver
in the rank
however, they state no refunds on their store page
Isn’t that the point of the border?
will paypal side with me if I chargeback?
is it possible to stop?
beacuse ppl get inside
faction bases
it teleports you back when you hit the border
really bad
Also, I dont want this going on my buycraft "record" that I chargebacked, because it is for a good reason(false advertisement, simply just not delivering what they promised)
is this all possible?
can anyone help me pls
i use worldborder
i can pay
how to stop the teleportation
Are you saying that you actually were given the rank but the perks weren’t applied? Or you know for certain that the perks don’t exist? How long did you wait before checking them
frost do you know?
@wind dock You can definitely charge back. But that's potentially not advisable. Contact their support first, and if you get a bad response, you can charge back citing the poor response as a reason.