#help-development
1 messages · Page 1447 of 1
kk
will that work?
main and listener are not in the same class?
getServer().getPluginManager().registerEvents() => this.getPluginManager().registerEvents(new <CLASS>, this)
the command is suppose to be /kick (player)
getServer().getPluginManager().registerEvents() => this.getPluginManager().registerEvents(new <CLASS>, this)
change it
Will that work?
okay thx
@digital plinth so will it work?
this person alr answred you
yes
but player.kick is a vanila kick
else if (args.length == 1){
what about mute?
its not?
bro
omfg
To mute you need to handle it yourself entirely
OI moderators what is this cooldown
over ride vanilla cmd then
else if (args.length == 1){
Player target = Bukkit.getPlayer(args[0]);
// do stuff
}```
have you EVER used spigot at all
cause you dont act like it
YOU CAN OVERRIDE THE VANILLA BAN COMMAND AND JUST DO <player>.kick() ONG
you are killing my brain
listen
you are using a spigot server, not a vanilla one
so every command you use is NOT vanilla
im so dead
yes i know
how to fix bug
but for example i want it to mute someone on the 3th time spamming and on the 5th a kick how?
arraylist and add 1 when they do something, when it reaches 3 ban for spam or such
shade?
how to fix??
dont use the class or shade it
why??
The server doesn't have the Apache commons class, which you have used when making the plugin. Either use a different class or shade it
Hey Guys!
Just a quick question, i'm currently using itemnames to differentiate items.
But there is anyway better to do it? Since what if someone renames an item to said name
Or is that the best way currently?
What are you using the names for
Clickable items that give effects.
alright thanks!
I have org.common already
if(event.getEntity().equals(EntityType.ZOMBIE)){
no it is saved
?
i get this
it is persistent
but i dont have 2 spigots in my dependencies
Thanks
You need to instantiate a WorldCreator
declaration: package: org.bukkit, class: WorldCreator
Es que en nukkit, yo hago Server.getInstance (). GetLevelByName ("mundo")
For example:
new WorldCreator("arena").createWorld();
Thanks
Thank u
To verify that it is loaded is to obtain the world and see that it is not null, right?
Ummmmm, maybe. Idrk
Or there is already a method to check if it is loaded?
no clue mate
I'm using a multimap to store a UUID (key) and materials (Values), in a command, I am looping over all of the materials associated with the key and adding them to the players inventory. However, when I update the multimap, how come it throws and null error and only allows for one block to be returned at a time?
Code:
Collection<Material> values = ChunkMiner.blocks.get(playerUUID);
for (Material mat : values) {
if (!isInventoryFull(player)) {
player.getInventory().addItem(new ItemStack(mat));
// ChunkMiner.blocks.remove(playerUUID, mat);
} ```
The commented line is the line creating the issue.
nope I changed it and it still isn't fixed
what is the issue
your if condition is probably just failing
punchBow.addEnchantment(Enchantment.VANISHING_CURSE, 1);
event.getEntity().getEquipment().setItemInMainHand(punchBow);```
how would I set punchBow's chance to impossible?
no?
chance?
that aint no punch bow
drop chance
the entire method is not getting called
yeah ik lol i copy pasted the code and didn't change le variable name
and you have no way of knowing whether it is getting called or not
yes i do ^
well you set it to be a diamond axe/....
a class that is not the main class
okay
that doesn't answer the question
iirc broadcast prints to console, but yeah use stout for debug
wait so how would i set the drop chance
How do you send a title using base components to a player?
probably block data for water und lava source blocks
player.spigot().sendMessage(ChatMessageType.TITLE
no it's used for DispenseBehaviorItem
i just need to get it to simulate dispensing of an item
again, what class is this in
RightClickTP
ChatMessageType.TITLE does not exist
huh i didn't change the name
what did u mean by this
does your plugin enable properly
is there any way to send hex colour through a title?
use paper
that said, I don't think the legacy parsers used by sendTitle and co. parse hex color codes properly
how does that work, how would you convert a message with hex colour codes in, say from a config, into that format?
would that work on ChatColor.of("#fc0303 blah blah") if there was text after, or would I need to isolate the hex
you'll need to isolate it
and again i don't think the string based methods handle hex colorcodes properly, even if you do append the string output of ChatColors to them
so unless you have a method that takes components, you're kind of screwed
how the hell do you manage block data in nms
yeah I doubt it too
block data is stored by the tile entity
it says it's a string
ItemStack punchBow = new ItemStack(Material.DIAMOND_AXE);
punchBow.addEnchantment(Enchantment.VANISHING_CURSE, 1);
event.getEntity().getEquipment().setItemInMainHand(punchBow);
it's probably a string
what should i do?
so for armor, i know its like boots.setDropChance() for it, but how would i set the drop chance for this diamond axe called punchBow
im using api from another plugin
you could try parsing the string into a number i guess but that's kind of gay
Do you think I could use the Adventure API straight and then have it work on spigot?
ok ill try thanks
not really unless you find something to send the appropriate chat packet with
adventure is just for building and managing the components themselves, it doesn't send them
basically if you can't find a method for that, drop spigot support in favor of paper
and when people ask you why you don't support splögget
tell them to ping md69 about missing functionality
or just skip the bukkit/spigot api entirely and use nms to send a chat packet
Yeah
this worked
thanks
a diamond axe???????????
wat
hol' uup
hey whats the correct place to get the latest jar?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
oh
https://paste.helpch.at/efufeyised.bash
i dont understand why its erroring
are you sure your jar isn't fucked
if you're using ftp, make sure to use binary transfer mode instead of ascii
whats ftp?
then you're probably not using ftp
you dont use it if you have no idea what it is
hi someone can help me to making working the PlayerInteractEntityEvent (when you right click on a villager) event?
early it is an event in the listener or in the main.java?
make the event, check if event.getEntity is villager. (Im assuming that event.getentity exists)
Im sure there is smthng like it
I checked and it's a player and the entity directly given
¯_(ツ)_/¯
it work in 1.8.9?
Guys. I have a big issue with displaying the second layer skin of a npc. I've set the datwatcher and the skin data with signature... What am I missing?
@wraith rapids same error
compare the checksum and filesize of the jar
see if it got fucked during the transfer
Update smh
ensure you actually restart the server instead of reloading or something
As aikar likes to say, you’re on a rotting dinosaur. Get off it and get on a 🚀!
I don’t remember the exact phrasing but you get it
a million flies like the smell of shit
?
? is not a good question
What do you mean?
i mean compare the checksum and the filesize of the jar
to see if it got fucked during the transfer
the jar
i just have it sitting there
you are moving it from place a to place b yes
and have my build path to that 1.16 jar
then why have you been talking about downloading all this time
Cause when i looked it up it said it was a corrupt jar file. So i redownloaded it
And same error
yes, so look at the checksum and filesize
to see if it got fucked during the download
filesize is the same as my server.jar
compare them to the checksum and the filesize at the source
server.jar? no, your fucking plugin.jar
i can see that
me.silentprogram.safecheck.Main.onEnable(Main.java:19)
this plugin
this plugin is written by you
it is trying to load a class from the plugin jar
but the plugin jar is probably fucked
compare the checksum and size of the plugin jar and ensure they are correct and not fucked
Compare it to what
What should it be
it should not be fucked
Ok.. So the plugin.jar i just export from eclipse
ok guys to win $100
please click the message box
press tab five times
press enter
type can i claim my $100
and press enter
When i looked i u
It said my buildpath might be corrupted
so i redownloaded the 1.16.5 jar for my build path
stfu
ant
use maven
idk what that means
what
I never understood what maven is
just use maven its a compiler
Is it another IDE?
Ok thats probably why i was so confused
or whatever else you're depending on
also dont use eclipse if u are
How do i put it into eclipse
are you sure you're not talking about classpath and not buildpath
yeah i thought that to but then i switched for like 1 hour and now i use it all the time
nah it isnt
Just
how do I start up a plugin?
isnt that a clone of hastebin
;-;
it means that one of your jars is fucked
or that you're trying to reload the server with missing jars or some shit
no plugin.yml?
So is the server messed up, or my plugin jar?
ur plugin
i have a plugin.yml
can someone provide a simple plugin that works I want to test on mc
we don't know but probably your plugin jar
where is it
unzip all of the jars and see if any of them blow up
it needs to be in a res folder if ur not in maven
is it supposed to be in src?
his has been working the whole time
maybe i accidentally move the config and plugin.yml?
a missing plugin yml won't make the classloader explode anyway
yes it will
it won't
cuz it wont find the main class
guys i dont know why
the only case it would blow up would be if it can't find the main class
me.silentprogram.safecheck.Main.onEnable(Main.java:19)
which it clearly can
but it is not recognizing the getConnection() method
it said it cant find the main class lmao
new MainCommand(this);
in the error
this is line 19
i thought it did lmao
the main class is already loaded and initialized
then its something wrong in the main class?
something wrong with the main class wouldn't result in the classloader blowing up on the zip file either
there is something fucked with the underlying jar where the classes are
what is on line 19 of your main anyway
new MainCommand(this);
whats in that file
public MainCommand(Main plugin) {
this.plugin = plugin;
plugin.getCommand("safecheck").setExecutor(this);
}
its a command file
thats the constructor
is there a executor?
?
u need the method that gets called when the command is run
it also need to implements CommandExecutor
can u show whats in it
yea
dont yell at me, im gonna go through and fix anythign thats messy later
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (!(sender instanceof Player)) {
sender.sendMessage("Only Players can access this command!");
return true;
} else {
Player plr = (Player) sender;
if (args.length == 0) {
plr.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("helpmessage")));
return true;
}
if (args[0].equalsIgnoreCase("reload")) {
if(!(plr.hasPermission("safecheck.reload")))return true;
plugin.reloadConfig();
plr.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("reloadmessage")));
return true;
} else {
if(args[0].equalsIgnoreCase("version")) {
plr.sendMessage(plugin.getDescription().getVersion());
}
}
}
return false;
}
}
wich one
the plugin?
hi i'm trying to spawn entities with nms but they spawn and they are invisble (like they are here but not)
isnt there a World class
yea, so im dumb
why do u need a CraftWorld
it's required by the method
if(getConfig().getString("configversion") == null || (getConfig().getInt("configversion") != 1)) {
getLogger().log(Level.WARNING, ChatColor.RED + "Config is outdated please delete the config and restart your server.");
getLogger().log(Level.WARNING, ChatColor.RED + "Disabling Plugin...");
this.getPluginLoader().disablePlugin(this);
}
what method?
this is what is erroring
class sry
i heard you shouldnt use nms
lol
craftworld is a cbo thing
will this code work? ```java
public class Main() {
public void onEnable() {
System.out.println("First plugin that probably won't work");
}
public void onDisable() {
}
}```
you should do Bukkit.shutdown()
is there a way to disable the plugin?
indentation why no indents it makes it hard to read without them
classes dont have arguments, @foggy bough.
u forgot one thing tho
yep sry miss understanding from my part
u forgot to extend JavaPlugin
and don't call it Main for the love of god
You shouldn't use NMS if you can avoid it
welp that just means 10 more years of java will do me some good
Or if you don't know what you are doing
i need to modify entity before spawning it
use World::spawnEntity
i dont think u need nms to spawn entity
i need to modify entity before spawning
getPluginLoader().disablePlugin(this);
is this the proper way to disable the plugin?
the api method allows you to pass a consumer that modifies the entity before spawning it
*In modern versions
i think so
yep i heard about it but how do i use Consumer i understand nothing from this
i saw everywere to create custom mob class
new Consumer() { @Override public void accept(Entity entity) { entity.doStuff() }}
or (entity) -> { entity.doStuff }
or this::consumerMethod
in parameter of spawnEntity ?
probs should add a return after the disableplugin also the if wtf is that
it just gives me a large error
well okay i try
checks the config version"?
if it exists, or if it is different than 1
wtf why would u do it like that?
idk
Don't use getString, use isSet
that wasnt supposed ot be string
Not for null
thanks for pointing that out
oh
iuts supposed to be Int
if(getConfig().isSet("configversion") || (getConfig().getInt("configversion") != 1))
then why are u getting it as a string for the null bit?
accident
how can I set the villager profession to an nitwit with spigot 1.8.9?
isnt it some sort of nbt
forge
hey does anyone wanna go through my code and make fun of me for how bad it is?
fail
its faster and more vanilla
to help me make it better
nah im not good at it myself
lmao
Fabric is for modern versions, unless you include the backports
Also green robed villagers were removed in 1.8
?paste
what
What?
can't find in doc world how can i use consumer
Main: https://paste.md-5.net/ifeqefozus.java
Listeners - (NIGHTMARE NIGHTMARE): https://paste.md-5.net/otopadamut.java
Command: https://paste.md-5.net/ukolixayud.java
anyone wanna help me make it better?
uh
wtf is that indentation
why not just use tab
Auto format it
shift + tab auto formats
oh
its ugly
like java doesnt care about formatting
BUT
COme on
its ugly without it
humans care about formatting
^
don't understand where do you find consumer
Eclipse formatting works fine
i think if u import the project in intelij it will do stuff and make it compatible
would i have to use packets or something
The client just doesn't support it
it gives me so manny errors
and intellij just looks ugly
yeah the client only supports cooldowns on a per-material basis
because u dont have the build path
no
Other errors
This is why maven and gradle exist
what errors
hmmmmmm
why is intellij so fucking confusing
omg the indentation
yeah it does Take a bit to learn it
agree
you can go much further with intellij than any other java ide rn
there are just plugins for basically every useful integration
yeah theres loads of plugins
i got a discord plugin
theres like a shop to get them lmao
they all free mostly tho
i think
Eclipse also has a marketplace
^
Since I started using it 8 years ago
There is a plugin marketplace on eclipse
can't fu** understanding how to summon an entity with consumer things wanna kill my self
I've only used it for dark theme but it does exist
omg its alot of money to put a game on steam man
they also take a cut bruh
$100 fee should be lowered
;-;
They have to make money too
because they take a cut
ik but they shouldnt have a fee
$100 is not a large fee
^
it is
It's really not
it is for me
not really considering the cost of keeping a platform like that online
lmao
Less than any of the textbooks they want me to buy
i tried to open it in eclipse
and now my whole fucking project is fucked
what the fuck
lmao ik but if you dont have $100 how are you gonna do it
build path
@somber hull don't try transfering projects bad idea lol
nope
yea no fucking shit
just use maven
You shouldn't be making a game if you cant pay 100$
gosh
im not
bUT if ur making a game and you spent all of your money on it and you cant put it on steam because you got no money the $100 fee is bad
also a $100 fee prevents spam for example
Well that would just be bad budget planning. Not steams fault
any idea on how to hide_potion_effects without removing the lore?
The idea of the $100 is to stop Steam being flooded with crap. If you are not willing to fork up $100 to host your game, you can;t be that confident in it selling.
well then steam should have it like $100 fee to make a creator account and then u get to make games on it for free
Also we should probably take this conversation out of #help-development
okay we should probably move this conversation to #general
What do you mean, what do you want to hide other than the lore message
the nbt ids
What
this stuff
no one know how to spawn an entity with consumer ????
That's not a potion effect
notlikethis
world.spawnEntity(location, class, entity -> entity.whatever)
uh well hide_potion_effect itemflag does remove that stuff
what is class ?
and entity ?
idk but who would pay $100 per game to put it on steam what if they didnt have money to begin with and they need to earn money and thats why they posting a game and to get more people they use steam but cuz they dont have $100 they cant make it to steam
entity is a variable for use in the consumer
then they go homeless
and how to init it ?
Someone who's not a kid and does it as a job (18+)
That is how you init it
w.spawnEntity(l, EntityType.ZOMBIE, CreatureSpawnEvent.SpawnReason.CUSTOM, (zombie) -> zombie.setCustomName("yourmom"));
You have to spend money to make money. Also if your that broke a game shouldn't be your income source
imagine game development is the only good thing u can do u wouldnt be able to get a job
okay thx a lot
poor people don't get to sell shit
if poor people knew how to do things properly they wouldn't be poor
i think its should be like a $10 fee
You can't provide a spawn reason on spigot
I guarantee you, you could get a job at McDonald's or something
Also it's spawn in this case, not spawnEntity
Then it would be flooded with crap at $1 each and you'd never find any good games.
wasn't that merged ages ago
this
Guess not
it's been on paper for like over a year
LMAo but steam reviews every game
Sureeeee they do
so the crap wouldnt get accepted
just pay the $100 goy
im not selling a game
Also theres other platforms to post games
but how do the free games get money
Microtransactions
steam most popular tho XD
well
how would i prevent a snowball/egg entity from breaking on impact
In app purchases and ads
and just let it phase through
ads*
you'll need to cast the Entity to something that has those methods
like Vindicator
Some people aren't doing it for money
I think it just gives you the type you pass for the class
imagine expecting to make money with a game
Last I checked
the most oversaturated market on earth just after youtube
spawnEntity doesn't
because the EntityType doesn't contain information about the class
Ah
I don't use that one since it's not available on spigot
why do people download the jar and add it
its easier to do maven
since it updates
because that's what the shit tier guide says
when u refresh the maven
((Vindicator)entity).setRemoveWhenFarAway(false);```
like this (don't work actualy) ?
You don't need to cast for half of those
Vindicator vindicator = (Vindicator) entity;
only in lmabda expression ?
vindicator.yourMom
Lol
cannot do this
sure you can
why if i disable the plugin it still shows up in the /pl list?
what are you even doing
disable != unload
i want it to disable and unload
Exception in thread "main" org.apache.commons.io.FileExistsException: Destination 'CraftBukkit/src/main/java/net' alreadyexists
with latest BuildTools from jenkins, is this a known issue? Running buildtools in a clean directory
how would i do that?
i'm trying to understand but i don't
BRUH use maven
no i mean if he wants to make a plugin
;-;
I need NMS
You still need to run buildtools for nms
u dont ?
why does player have a getplayer method
Why not grade...
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
i am using maven 😉
Because OfflinePlayer has a getPlayer method
no you dont i think
Yes you do?
yes.. you do
Where do you think it comes from
k but why do u need nms
bukkit
Can't host NMS code online
oh lol
anyways, any reason why latest build tools in a clean directory wouldn't run?
getLogger().log(Level.WARN, "Config is outdated please delete the config and restart your server.");
why would u need nms
theres nothing wrong here right?
your supposed to avoid using it really
its saying .log() doesnt work there
no, not really
unless u really have to
Could you send the buildtools log?
If it generated
how can I find out which scorebaord team a player is in?
buildtools takes ages af
because it has to patch the jar
anyway why do u need nms?
Exception in thread "main" org.apache.commons.io.FileExistsException: Destination 'CraftBukkit/src/main/java/net' alreadyexists
at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2923)
at org.spigotmc.builder.Builder.main(Builder.java:567)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
I believe that's all that's relevant, I can send the whole log if needed
Yeah sounds like it isn't a clean directory
no isnt it net minecraft server lmao
n m s
Correct
._.
Which is minecraft server code
oh
can assure you it is
i thought it was called net minecraft server
k
¯_(ツ)_/¯
its saying a directory already exists i think
¯_(ツ)_/¯
$ rm -rf spigot-build-tools/
$ take spigot-build-tools
$ wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
--2021-05-19 21:47:30-- https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving hub.spigotmc.org (hub.spigotmc.org)... 104.27.195.95, 104.27.196.95, 2606:4700:21::681b:c45f, ...
Connecting to hub.spigotmc.org (hub.spigotmc.org)|104.27.195.95|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4153958 (4.0M) [application/java-archive]
Saving to: ‘BuildTools.jar’
BuildTools.jar 100%[==================================================>] 3.96M 3.91MB/s in 1.0s
2021-05-19 21:47:31 (3.91 MB/s) - ‘BuildTools.jar’ saved [4153958/4153958]
$ java -jar BuildTools.jar > output
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Picked up _JAVA_OPTIONS: -Djdk.net.URLClassPath.disableClassPathURLCheck=true
Exception in thread "main" org.apache.commons.io.FileExistsException: Destination 'CraftBukkit/src/main/java/net' alreadyexists
at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2923)
at org.spigotmc.builder.Builder.main(Builder.java:567)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Hi guys, I need to call a method that retrieve the number of a world's players inside a playerJoinEvent. When a player joins the event is fired before the world can add the player to its list. Is there any method that can I use?
@chrome beacon ^^
Yeah that looks fine not sure why that error would be appearing
i dont use linux
Just add 1?
there is a method i think but idk what it is
I could do that. I was only wondering
PlayerWorldChangeEvent isn't fired so that isn't the one
actually maybe not but theres ways to do it
rm -rf spigot-build-tools/
will older build tools work?
public int getPlayerCount(String worldName)
{
int amount = 0;
for (Player player : Bukkit.getOnlinePlayers()) {
if (player.getWorld().getName().equals(worldName)) {
amount++;
}
}
return amount;
}``` i think this should work?
i dont know if theres a better
way
I don't think getOnlinePlayers includes the new player either
yeah but that isnt accurate
What? yes it is
adding One?
yes?
it isnt accurate
Sure it is
cuz then u have to remove one if u leave
How many players do you think join in a single join event
lol
it could bug out
Yes java is famous for forgetting how to add 1
maybe a game crashed didnt call on quit
It does
¯_(ツ)_/¯
only that you disconnect
same happens on build #125 and #126 -_-
Not sure
What you could do is launch a windows VM
we're talking about adding +1 to the number of players
not maintaining a separate tally of the number of players by listening to join/quit
didnt they say they wanted to get players in a world
could do, but I should have to
yes
on join
i hate the rm -rf command
they did yes
has no one tested this on linux in like 2 months?
i'd like it better if it had output
so get the players that already are in the world
they probs want the current players online
Yo, Anyone know if entity metadata survives server restart?
it doesn't
No
rm -rfv @dusty herald
PDC does
kk thx
int worldPlayers = event.getPlayer().getWorld().getPlayers().size() + 1;
Pretty simple
is that even a thing
why do you doubt everything ahah
i dont knOw never seen it before XD
Forgot the size part
🙃
i just never used it or seen it
lmao
i never needed to get player count XD
on a world
i can't cast anywhere with LivingEntity
because if ur casting something to LivingEntity i think it needs to be a instance of it
lmao
And?
Dang you bot
Does anyone know how i can properly force a swing animation
Yeah
which packet
but i bet its hard
Not really
the arm swing one?
placketplayoutanimation #0 ignores the attack speed of the item the player is holding
like call the actual packet
ctf+f -> swing
u might have to use nms
im not sure
for packets
as i said #0 ignores the attack speed of the weapon the player is holding
I need the animation to reflect the attack speed as well
i think u have to give it the attack speed
the server isnt just gonna know what the attack speed is
if you dont give it anything its just gonna be default
public static void runTotemDisplay(Player player) {
EntityPlayer ep = ((CraftPlayer) player).getHandle();
PacketPlayOutEntityStatus status = new PacketPlayOutEntityStatus(ep, (byte) 35);
ep.playerConnection.sendPacket(status);
}```
gl to find the good packet to send
i think
what
this code is to send totem use to a player
it should be the same with swing animation
or particle
https://paste.md-5.net/suleloqata.coffeescript should be valid, doesn't let you use a custom spawn reason but it defaults to custom anyway
I guess you could rename entity to vindicator to be more concise
hooo if it work i just love you
the whole protocol of mc is written on the internet lmao
yep
Why wouldn't it be
yep i have friend trying to recreate spigot but in C# and full use it
now ask him to do it with lua
hahaha
Are you using nms or protocollib @granite stirrup
Wait sorry wrong person
Yeah
yeah packetplayoutanimation doesnt compensate attack speed
declaration: package: org.bukkit.entity, interface: LivingEntity
could u make a zombie swing its hand
with that XD
Why both?
i mean it does have a animation for it
protocollib sends the packet and the packet itself is from nms package lol
but ill try the API method
No, you can write to the packet
Without nms
okay so i resume i came here to know why my nms entities spawn are invisble but here, they tell me why i use NMS and not bukkit, so i try to make it with bukkit in 2hours and now testing again and what a suprise my entities are AGAIN invisble but here
haaaaaaaaaaaaaaaa
i go jump from the first flour of my building
and come back to my computer with a broken legs
why would u need that
can i detect cause of death from EntityDeathEvent, or do i have to use EntityDamageEvent and check for the health <= 0?
nope
does the entity have it?
otherwise i wouldn't be asking
something like e.getEntity().getDeathCause()
that would be it, I'm not looking at the docs
B)
this does the same thing as the packet, it just completely ignores the weapon attack speed
im assuming its because its not technically attacking or something
i think its getLastDamageCause
I was just showing that you could avoid nms
lol
Are you using the vanilla client, are any other plugins interfering with the spawned entity
help guys your my last chance before deleting my project
i think if u use nms it only supports one version which sucks
any i'm the only plugin
i think thats why people try and avoid nms
for information the entity is spawn in an not loaded by player chunk
Exactly
but even if i getChunk.load() it still don't work
nope, you can write code for each version
Or Modules
nothing else than FAWE
pretty sure most projects go down the route of using modules and writing the methods needed
because it's faster + easier to read
WOW
the jar compiled fine on centos 7
but not on arch
maybe it doesnt support arch
it work when i spawn it and i'm near them but when i try to spawn them in a location which any player are that gltich
I'm not sure spawning entities outside loaded chunks really works
.
it's pre-generate chunk
so it could
Doesn't mean it's loaded
ye i dont think u can spawn entities out of loaded chunks
iirc it loads the chunk before spawning it but i could be wrong
either way, good practice is to check whether the chunk is loaded and if it isn't, attempt to load it asynchronously via paperlib's async chunk api
i dont know why do u need to spawn something out of players reach i think its possible since someone spawned a villager out of loaded chunks in a mod
as trying to spawn shit in an unloaded chunk will either sync load it, which is bad, or fail entirely, which is also bad
How do I run a command as all Creatures/Entities through a command like an event
the project is to pregenrate a labyrinth and summon Guardian Temple in it (mini-boss with abilities)
make sure to set its removewhenfaraway and whatnot to false
already done
every party generate a labyrinth of 1200x1200
Entity guardianEntity = this.spawnLoc.getWorld().spawn(this.spawnLoc, Vindicator.class, entity -> {
entity.setRemoveWhenFarAway(false);
entity.setCustomName("§bGuardian");
entity.setCustomNameVisible(true);
entity.setMaxHealth(health);
entity.setHealth(health);
entity.getEquipment().setHelmet(Utils.EnchantedItemStack(Material.NETHERITE_HELMET, Enchantment.PROTECTION_ENVIRONMENTAL, 2));
entity.getEquipment().setChestplate(Utils.EnchantedItemStack(Material.NETHERITE_CHESTPLATE, Enchantment.PROTECTION_ENVIRONMENTAL, 3));
entity.getEquipment().setLeggings(Utils.EnchantedItemStack(Material.NETHERITE_LEGGINGS, Enchantment.PROTECTION_ENVIRONMENTAL, 2));
entity.getEquipment().setBoots(Utils.EnchantedItemStack(Material.NETHERITE_BOOTS, Enchantment.PROTECTION_ENVIRONMENTAL, 2));
entity.getEquipment().setItemInMainHand(Utils.EnchantedItemStack(Material.NETHERITE_AXE, Enchantment.DAMAGE_ALL, 5));
entity.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 999999999, 1, false, false));
});```
make sure that mob spawning and shit is allowed in the world
lmao u have gone old school and used §
that's a real man
yep it's allow but the mob is here
he is doing all abilities but invisble
the boss bar is here
the spider on the screen is summon by him
Choco would yell at you for using the color symbol :p
tho using that is kinda lazy
Maybe the client never gets sent the packet for the entity
thinks so but when i deco/reco they still not appear
i'm gonna be crazy with this that make 5 hours that i'm on it
maybe it isnt finding the vindicator textures
If you can find the entity and face it with F3
when i forced spawn next to me
Try without optifine just to be sure
that complicate a lot the programm and very not perf proof
how would I change a block to redstone dust?
yeah but if u cant get it to work spawning out of chunks u just have to do that
block.setType
in my dungeon setup i do what old console games do
it needs blockdata, how do I use that?
yes i konw but i really don't wanna do this
that is, assign rooms with neighbors and activation conditions
a deactivated room has no logic running for it and has no entities
how do you detect player entrance whitout playerMoveEvent ?
i check asynchronously every few ticks
the whole thing runs asynchronously save for all of the shit that needs to be thread safe with bukkit
the rooms are stored in an octree so it scales relatively well even for a large number of rooms and players
smart
you just run a Bukkit.getScheduler.runTaskAsyn() every tick of player move event or a schedul task doing things async ?
no i have a dedicated thread for it
Runnable ?
a single thread
Huh
extending thread and overriding run
TIL about octrees
bukkit is unnecessary as it isn't really a task
remember to use paperlib if you make it public
nobody wants a plugin that performs like shit
what a mess with this it will be nice to spawn them with no bug
what do you mean by this ?