#help-archived
1 messages · Page 185 of 1
but is Block#getDrops not BlockBreakEvent#getDrops
declaration: package: org.bukkit.inventory.meta, interface: Damageable
I mean isn't the seeds drop on wheat just random from 0-3
dont think
I think seeds are, but not everything is
Yes, except that my plugin can handle any kind of plantation like carrots, nether warts etc x)
i mean in 1.12 is as simple as checking if its Ageable
no need for individual crop
But the amounts are still different for different crops if I recall
How do i make a chat prefix?
Class[] cArg = new Class[2];
cArg[0] = String.class;
cArg[1] = double.class;
Constructor constructor;
try {
constructor = net.minecraft.server.v1_16_R1.AttributeBase.class.getDeclaredConstructor(cArg);
} catch (NoSuchMethodException e1) {
e1.printStackTrace();
return;
} catch (SecurityException e1) {
e1.printStackTrace();
return;
}
constructor.setAccessible(true);
AttributeBase base;
try {
base = (AttributeBase) constructor.newInstance("minecraft:generic.attack_damage", 2.0D);
} catch (InstantiationException e) {
e.printStackTrace();
return;
} catch (IllegalAccessException e) {
e.printStackTrace();
return;
} catch (IllegalArgumentException e) {
e.printStackTrace();
return;
} catch (InvocationTargetException e) {
e.printStackTrace();
return;
}
DEFAULT_ATTRIBUTES.put(EntityTypes.CHICKEN, EntityInsentient.p().a(base).a());
This still gives java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage
How do i make a chat prefix?
@craggy lynx https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/AsyncPlayerChatEvent.html
declaration: package: org.bukkit.event.player, class: AsyncPlayerChatEvent
Thanky
@placid kiln What the hell are you doing?
declaration: package: org.bukkit.attribute, enum: Attribute
org.bukkit.entity.Damageable <- is this the damageable interface I want?
No
context:
public class CoolChicken extends EntityChicken {
private static final Map<EntityTypes<?>, AttributeProvider> DEFAULT_ATTRIBUTES;
static {
try {
final Field modifiers = Field.class.getDeclaredField("modifiers");
modifiers.setAccessible(true);
final Field field = AttributeDefaults.class.getDeclaredField("b");
modifiers.setInt(field, modifiers.getInt(field) & ~Modifier.FINAL);
field.setAccessible(true);
DEFAULT_ATTRIBUTES = new HashMap((Map<EntityTypes<?>, AttributeProvider>) field.get(null));
field.set(null, DEFAULT_ATTRIBUTES);
} catch (Throwable reason) {
throw new RuntimeException(reason);
}
}
public CoolChicken(Location loc)
{
super(EntityTypes.CHICKEN, ((CraftWorld) loc.getWorld()).getHandle());
// my previous message because discord doesn't allow long messages
this.setPosition(loc.getX(), loc.getY(), loc.getZ());
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, false));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
}
}
inventory damageable?
The one you want is in the inventory.meta package
gotchya
Hes trying to give a damage value to the chicken
Hey here
Can anyone explain me if I'm totally stupid
Why don't work if gameStarted == false startGame() gameStarted = true
and you are trying to do what exactly
I'm on mobile
that means nothing with no context
Bruh
If you want help with your code, then you're going to have to share your code...
I'm on mobile
then wait until you are on a pc
Ik
also semicolons
Ok wait
He clearly didn't post the code he's actually used
All I can tell you is that that code will call the startGame method if gameStatred is false
Which means what he posted is completely irrelevant
exactly
nice name btw
can't you just put it in onEnable()?
I think I need to post the 10 minute "Help me to help you" video again
public static void CountDown(){
new BukkitRunnable() {
@Override
public void run() {
if (getCount() == 0) {
if (GameRunning == false) {
RunGame();
Bedwars.GameRunning = true;
}
}else{
count--;
coutdown = "" + count;
if (getCount() == 10){
SelectWinMap.selectWinMap();
Bukkit.broadcastMessage("§8[§6Vote§8] §7Map §6" + Map + " §7has won! §3(" + MapW + " Votes)");
Bedwars.mapstring = Map;
}
}
}
}.runTaskTimer(Bedwars.getMain(), 0, 20);
}
}```
this shit
idk im totally stupid maybe
yack what is that
That code can't be complete. I mean, where is the count variable even defined?
please follow the code formatting and naming conventions
count is up
Yeah that PascalCase though
this is illegible
read, understand, and follow this
then rewrite your code to follow it
then, repost it
and we will help you
when i added if gamerunning == false it started to do nothing
do it. if you have no interest in helping yourself, what makes you think any of us have any interest to help you?
i dont see you cancelling the task anywhere
You're checking the count with getCount(), but then modifying it directly with count--
and yes gamerunning is false
If count is a copy of getCount(), then the actual counter won't be decremented
thants not the point
It is quite the point if count is never 0
the point is it started to do nothing
You're also referring to GameRunning and Bedwars.GameRunning - are those two different variables or are you in the Bedwars class?
Also, while you're at it, you should make use of OOP
basically; learn java and try again
BRUH
i recommend watching a bunch of tutorials to get it wrapped around your head
bukkit or java tutorials
See you in 3 years!
ur guys so funny -.-
You can learn java in 10 hours
We're being realistic.
i understand java
We're actually trying to help you
Clearly not well
I disagree with that statement
This isn't even Bukkit though really
We're just saying there are bigger issues than the code not working
Ignorence is bliss. The less you know the more confident you are.
based on how its implemented
i dont see you ever being able to cancel the task
because you are not saving a reference to the object
Well yeah he doesn't store the threadID or task object
BukkitRunnable is one way of implementing
you could also use TimerTask and Timer
many ways
Can I use a bukkit event in Spigot-Server?
What event are you trying to use?
AsyncPlayerPreLoginEvent
in here for example https://i.imgur.com/BHVU2UQ.png
A Spigot server has everything that's within the Bukkit API
yes
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
oh you want to make a custom event?
not really
wait why are you inside CraftPlayer
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I got told a million times that I shouldnt fork spigot for that but I want to
just want to add my methods to player
Okay what if I am that guy
how do I do it, I want to set level from mysql
as everyone else told you make your own plugin to do that rather
than directly forking
cause its easyer
I mean the API is there for a reason
a) You clearly don't know how to make a fork
b) It's so much easier
c) The plugin system is designed for exactly this
So instead of using an engine to move a car, you'd rather push it by hand?
That's what you're attempting to do here
thats what I am saying I guess
I mean you won't be making a plugin at that point, it will be built into the server jar
i guess go for the hard way,noone stops you
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
have fun breaking shit
Unless you are doing some hardcore behind the scenes stuff, outside of the reach of the API, you get no benefit from doing this
read there and find out
I already read that
If you got to ask, then you're clearly not ready to fork Spigot
But to each their own
it doesnt really tell me?
What you are asking is not a simple thing, a bit too complex to explain via discord
what do you want
he wants to fork spigot..
why though
And build his code into the server jar
He wants to do things the hard way. To spend hours on something that would take a few minutes. And then to gain no advantages out of it.
he mentioned something about adding methods to a player
to add somem methods to return coins in the Player class
reasons apparently
just write a wrapper or an util class to handle it
ItemStack item = new ItemStack(Material.BONE);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(name());
item.setItemMeta(meta);
```any reason for this to get null pointer exception?
item isn't guaranteed to have meta
okay I wont do it since you guys are really against it and you are probably right
like you just rebuild it with maven
Where are you getting an NPE exactly, David?
but can I otherwise extend CraftPlayer?
second
Craig, any item other than air will have #get non-null meta
you need to either check item.hasMeta()
I got so confused, I commented the line and it still caused an exception
or if(meta != null)
@silent veldt its a fresh created itemstack
it doesnt matter
that method name is most likely returning null
its not, its from an annotation
show the code for it
there is no code though, its a attribute for an annotation
at com.david.specialwolves.Main.onEnable(Main.java:40) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [spigot.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [spigot.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:457) [spigot.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:267) [spigot.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot.jar:git-Spigot-800b93f-8160e29]
at java.lang.Thread.run(Thread.java:835) [?:?]```
the stack trace will tell you the line it's throwing on
40 is the new itemmeta line
You're running a different version on the server than the one you provided here
item is null then
The item variable was created a line before
yeah but what else on that line would throw an NPE?
Nothing
Hence I said he's running a different version
wouldn't matter
Even if it didn't have meta, you'd not get an NPE
it would just store null in the meta variable
wouldn't throw an NPE unitil you access it next line
You're simply not running the code you've posted here or you've misaligned the lines
let me try again
Problem: essentials x doesn't let me use @p on power tools. Does anyone know how to fix this?
Make sure there's only 1 instance of the plugin in your plugins folder - it might be you're running an older version instead
@silent veldt whats the server version vs the api version
@grim halo It's not supposed to ... You're supposed to use the player name https://essinfo.xeya.me/commands.html
idk if itd matter but if ur using an api below 1.13 on a 1.13 server
i heard there was a big update between 1.12 and 1.13 so like
yeah, the flattening
yeah are you doin dat xd
the godly material enum
anything that doesn't specify api-version will enable legacy materials
lol wondered why you tagged me
xd mb
Even if the problem above had to do with the compatibility layer, the line he said he had an NPE on could not have had an NPE
basically yeah
@wraith thicket well I am using a spawn kit and I was hoping that somehow I could tp whoever the user of the tool is to a set location
Is that possible somehow?
yeah, I don't think new ItemStack will ever return null with a valid Material
If you create a new object, you cannot get null
depending what the material is maybe
You could throw exceptions
a constructor can't return null
But you won't get null
yeah that would stop the code
oh
it must be a line number issue
god discord is either dying again or its just me
idek what happened, no exception anymore
Hey, would anyone know where EntityArgumentType is?
I think I was just running an old jar over and over
sounds right
u should always check the date modified of the jar
itll tell u what time it was last like created
They probably had multiple jars for the same plugin and simply ignore the warning about it and ran the old version
not always but if u think like smthns wrong and ur for sure its right
i hate that pterodactyl panel doesnt overwrite
thats the only bad thing i see when i compare it to multicraft
Wait a moment, the entire net.minecraft.command package is gone in spigot?
Cause EntityArgumentType would be under net.minecraft.command.arguments...
Well I just need EntityArgumentType, but I can't find it under spigot NMS...
u have the other nms packages right
is there a way to get EntityTypes with an id?
wdym
I dont see a method in EntityTypes or a way to iterate through all of them
u have the other nms packages right
Wdym?
net.minecraft.server.v1_15_R1.EntityTypes;
should be literally same thing
different from "EntityType"
EntityTypes.values
I don't have any packages in net.minecraft.server
its still a enum
(well besides the version)
also why you want to get a entity through nms
spawn it with api,cast it on livingentity and you have everything you couldv done with nms
also yeah there isnt a enum for it
each entity has it s own class
EntityZombie/EntitySkeleton
EntityTypes is different though, I think they literally have an atrribute per type
just say what you are trying to achieve
I found a method to register enttites but it used EntityTypes while I recorded id only of all the custom entities im registering
public static void register(String name, EntityTypes<? extends EntityLiving> entityType, EntityTypes<? super EntityLiving> parentType, EntityTypes.b<? extends EntityLiving> maker) throws IllegalStateException {
MinecraftKey key = MinecraftKey.a(name.toLowerCase());
Map<Object, Type<?>> dataTypes = (Map<Object, Type<?>>) DataConverterRegistry.a()
.getSchema(DataFixUtils.makeKey(SharedConstants.getGameVersion().getWorldVersion()))
.findChoiceType(DataConverterTypes.ENTITY_TREE).types();
dataTypes.put(key.toString(), dataTypes.get(parentType.h().toString().replace("entity/", "")));
EntityTypes.a<? extends EntityLiving> a = EntityTypes.a.a(maker, EnumCreatureType.CREATURE);
entityType = a.a(key.getKey());
IRegistry.a(IRegistry.ENTITY_TYPE, key.getKey(), entityType);
}```I mean that's the method
Huh... I'm using spgiot as the maven dependency, not spigot-api, and I have ran build tools. How come there is only a limited selection of NMS classes available?
it just looks like an enum
there is no values()
its just static attributes that are all caps
I'm trying to not do every entity seperatly
list them?
so I'm using reflections to retrieve values from annotations
I stored int ids for all of the entities, and trying to make it so that whatever I annotate gets registered
but I cant convert id to EntityTypes
because it doesnt have values() or a way to compare with everything
well time for you to do it for each
nms isnt covering everything as its not supposed to be used i guess
is there a way to change pathfinders without NMS?
i think in new versions we have an api
Huh... I'm using spigot as a maven dependency, not spigot-api, and I have ran build tools. How come there is only a limited selection of NMS classes available?
its most likely how you get the dependencies
i simply add the library to my project so i have all the methds including nms
huh
Wdym how I get the dependencies?
I'm using compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'
There is not a limited amount of nms classes
If you build it correctly it will be in that library
maven is a bit picky about it though
I've read this:
No?
you have to also include craftbukkit to allow acces to nms
It’s gradle just mavenLocal() and then link to the server implementations you ran buildtools with.
MiniDigger
Buildtool will only include classes spigot actually patches. If you want to add new classes, take a look at the import mcdev scripts
ShaneBee
The rest of the classes which are not patched by craftbukkit/spigot can be found in the work folder
It’s gradle just mavenLocal() and then link to the server implementations you ran buildtools with.
But that's what I'm doing already...?
idk im simply slapping the jar in and im good
It seems the rest of the classes that spigot doesn't change aren't included when I compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT', is that right?
Basically, I just need to use the class net.minecraft.command.arguments.EntityArgumentType (this is yarn mapped) in my spigot plugin.
Well that class probably have other classes inform of fields in it so that’s why ya need the entire dependency
Kinda
And I get the entire dependency by...
you have to also include craftbukkit to allow access to nms
or
i simply add the library to my project so i have all the methds including nms (and how?)
?
What?
If you need only the api (Bukkit interfaces) then use spigot-api
If you need CraftBukkit and Nms go for spigot
Maybe it got deleted?
PlayerLoginEvent not working now ._. I have a statement to check if a player is banned in the database and the code within it runs (tested with a println statement), however, event.disallow() and player.kickPlayer() don't work any ideas why?
I mean snoopy have you looked carefully?
I mean, it's probably named differently, but yes I have looked and I simply can't find it...
@pastel nacelle that's what I was using before and I had the same issue... Someone in here told me like a week ago to use PlayerLoginEvent instead because that's when the server actually knows the UUID or something like that.
Hmm yeah haven’t looked into 1.16.1 yet very much
I'll try again with async right now
I can find it easily with yarn mappings at net.minecraft.command.arguments.EntityArgumentType, but on spigot I can't find it anywhere.
That’s unfortunate
.-.
Does anyone know a good nick plugin that can change prefix to nick as another rank?
@pastel nacelle yup still doesn't work
What is really the difference between paper and spigot? I literally replaced the jar and nothing really has changed
paper has better performance
paper is kinda spigot, but better
more expansive api, better performance, and more inbuilt features
Is there a better way to create custom entities or is it the same?
throwing shade at spigot in its own discord server
there is the mob goal api if you mean that
I mean spigot works fine but afaik people use paper since it patches some dupes & exploits etc
not really
in fact as of recent, paper has gotten a lot of complaints because it fixes some dupes and exploits
Afaik it does?
people are migrating over to paper largely because of the performance
and because big plugins like worldedit recommend it, and work better on it
fawe
I personally don’t feel a performance boost but ig
nvm I figured out what was wrong I'm dumb
KM127PL +1
like, I would rip to shit immediately without paper's async chunks
and no-tick view distance
Though there was a book exploit which I for sure know paper patched
i think that has been pulled in upstream now, not sure if it's 1:1 the same impl though
Ah yeah presumably
so is making custom entities basically the same? I'm so confused, do I still want to extend by Entity___ using paper?
unless paper has some tools for it that spigot doesn't, you do what you'd do on spigot
Every spigot plugin should work on paper but not the other way around ?
basically
Afaik paper doesn’t change anything in the existing api
there are a few cases where existing api is modified but everything should still work mostly the same to the user calling the api
i want my server ip/domain to show here https://mcsrvstat.us ; but its not working?
wdym not working?
^ maybe thats a query problem
thx
...
spigot doesn't have mappings for most stuff in nms besides class names I see
This is why I have my fabric mod open to yarn mappings 😄
Is there a good nick plugin where you can change your name as well as your prefix to nick as another rank?
EssentialsX has that
If all you mean is a nickname + a prefix showing that it is indeed a nickname
does anyone know a plugin that allows a lobby like hypixel?
use bungee
to be fair its the most popular server
and then use one of the 1000 million server selector plugins
To be fair, I don't care
i just asked a question jeez
Most popular still doesn't mean everyone's been there
but it means most people have so its the most fitting server to ask about
why would you want to copy another server tho? Make it custom players enjoy that better
Most popular doesn't even necessarily mean "most people have"
ford has always manufactured sloppy engines
so it looks like if a user used hex colors in their essentialsx nickname, and I use getDisplayName in ComponentBuilder, the colors get all mangled.
i just want to know a good loby plugin
Look for a lobby plugin. Look at different ones. Look through features. Look through reviews.
It's impossible for someone else to know your preferences. All someone else can tell you is which one they prefer
There's plenty of Lobby plugins, https://i.imgur.com/tUX5MyX.png
thanks
Is there any tutorial on registering entities? I've given up on finding a method so I might as well learn how to do it myself. What do you do to register a NMS entity?
I'm fairly certain you'll find plenty of examples on the forums if you search for them
@grim halo tbh just hire someone to code it for you so you get what you want
I've tried the forums but the only one I found basically tried to get a field from null
which makes no sense
le wut
how can i show ALL players connected to my server in the tablist?
so i have a bungeecord, and i want a tablist, that shows all players, doesnt matter on which server they are
i don't remember if bungee supports that built in, if not, use a tab plugin
well i dont really want to use a plugin thats not from myself, i never liked using others plugins. Have to stick about what they build in.
actually want to make an own plugin
most of the time using others plugins is probably the better choice
there is physically no way you can spend as much time and effort on refining every one of the plugins you need as the people who have already been refining them for years have
its just a small thing, to show them. i think. but i am looking at the wiki for scoreboards atm
not to mention that many people probably have more experience than you have, if not with bukkit/java generally, then with the subject matter of the plugin
and that means? i cant make own plugins? i got so much plugins that just destroyed my whole server, with fake reviews etc, i will never ever do that again
Does it cost anything to verify?
you can make plugins
what you shouldn't do, though, is "never use other peoples' plugins"
nap its free
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
thats seems like its for spigot
This is the spigot discord?
my point is that there is no point of reinventing every wheel there is
yeah but i asked for bungecord
feel free to reinvent any given wheel you want to reinvent
but there is no sense in restricting yourself to only selfmade wheels
yeah i know, but maybe my thougts are different
I haven't messed with bungeecord, but I'm pretty sure it'll be almost the same if not the same.
yeah, thanks. i will look at it
any ideas why spigot's chat api is mangling the rgb colors used in an essentialsx nick? I'm using getDisplayName inside a ComponentBuilder and it works for mc colors, but come out all wrong for rgb
its an API it doesn't mangle anything, you are probably doing it wrong
If you truly want to learn how to code and make your own plugins that should be way more than enough to build an animated scoreboard. All you need to do @tough kraken is find out how to animate it a scheduler and there are plenty of tutorials on how to do that
the only question i literally had is, if its large different from spigot.
I can't answer that I've never made a scoreboard on bungee before. My advice is to read that tutorial and code your scoreboard if it works you figured out your answer. If not, you'll have to search for another that works on bungee
thank you
Scope is probably more relevant to BungeeCord, although BungeeCord is different in coding than Spigot since it's a different API.
I'm not doing anything, it's essentialsx and spigot
it worked fine in 1.15
getDisplayName is literally a bukkit thing
player.spigot().sendMessage(new ComponentBuilder(player.getDisplayName()).create());
mangles the rgb display name
As is always the case, it worked fine in previous version is irrlevant since RGB is a new API for 1.16.x. My thought is it has nothing to do with Spigot API since you are testing with 1.16.x based plugins and not testing directly the RGB functionality in the API. So, woudn't assume its Spigot's fault, more than likely the Plugins purported to work with the Spigot API on 1.16.x are not correct or not updated to latest API since the API is not final.
what do you guys think of thenewboston tutorials?
well the colors work fine in essentials/vault
getDisplayName() gets the displayname, so what is being stored in the displayname and by what plugins under what assumptions.
so you're 100% sure it's their fault?
eliminate getDisplayName() and test again, hardcode the RGB, then check again. Try to narrow it down, eliminate the plugins if you are that sure.
cause I'm telling them that then, because this isn't on me to fix and I have no idea who is
Erm so im getting the error where they can't connect to a default or fallback server. I'm like 80% sure I setup bungeecord right.
What do i do?
What version of Spigot/Paper, what version of EssentialsX and is this through BungeeCord/Waterfall if so what version of those?
@wraith thicket why did you ping me?
Oh - must have been an accidental tab-complete meant for Sticky Man or something like that
Hey! I've got a problem, I'm trying to make it look like we're wearing diamond boots. Except with my code, when I put the boots on, the effect doesn't wear off but it does when I take them off. Here's my code:
public class FullArmor implements Listener {
@EventHandler
public void InventoryClose (InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked();
p.sendMessage("we have reached this code");
PotionEffect speed = new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2);
p.addPotionEffect(speed);
p.sendMessage("we add the potion effect");
if (e.getSlotType() == SlotType.ARMOR && e.getCurrentItem().getType() == Material.DIAMOND_BOOTS) {
e.getWhoClicked().addPotionEffect(speed);
} else {
if(p.hasPotionEffect(PotionEffectType.SPEED)) {
p.removePotionEffect(PotionEffectType.SPEED);
}
}
}
}```
I'd like an explanation as to why it doesn't work and whether the event you're using is the right one.
and it won't run in console either .-.
hey im having a problem with the nether, hostile mobs wont spawn there
no blazes
and piglins wont attack me
Check your difficulty :p
Check your mob spawning caps and gamerules
Gamerule doMonSpawning true?
wtf whats wrong with the scoreboard? should work, but its throwing this when setting the scoreboard:
here is my code part:
https://hastebin.com/yixaqafoya.cs
is it showing an error?
no
sorta unsure what you're trying to do though
try more sysout's to figure out where exactly it stops running
sooo how do i check mob spawn caps?
wtf whats wrong with the scoreboard? should work, but its throwing this when setting the scoreboard:
here is my code part:
https://hastebin.com/yixaqafoya.cs
@tough kraken anyone please 😦
in NMS, which methods add pathfinders? I found initPathfinder(), but there is definetly another method that does movement pathfinders
Finally... I fixed the console problem, but I have another problem I needed to ask about...
Autocomplete isn't working
try more sysout's to figure out where exactly it stops running
@tough kraken so i replace p.sendMessage by System.out.println("We reached the code")
public static void registerCommodoreCompletions(Commodore commodore, PluginCommand command) {
commodore.register(command, LiteralArgumentBuilder.literal("explode")
.then(RequiredArgumentBuilder.argument("targets", ArgumentEntity.d())) // Single target: false, only players: true
);
}```
Why isn't this working?
you can use sendMessage as well, but in my opinion sysout is better
anyone?
Oh yeah, I'm also using setTabComplete too, just for basic player names, but that's not working either.
You could try only using one at a time? If I were to guess, you can't use them at the same time
Trying...
How can i replace EnumParticle in this line?
1.15
So what's wrong with World#spawnParticle()? Because you can't create a new instance of Particle. It's an enum
Same result...
It's the commodore completions that aren't working when I want it to autocomplete entity selectors with ArgumentEntity...
Do you know when paper spigot 1.16.1 will be stable?
when Am find a invite
idk google it
I'll show more code I guess...
Going to guess it will be the same way you found Spigot's Discord invite link, only... on their platform...
That being said, they won't be stable until Spigot is stable
And you know how long the spigot will be unstable
plugin.yml in commands section:
explode:
description: The explode command, used to send a fake explosion to a player.
usage: /explode <player>
permission: hypercore.explode
forever
You're probably fine to use it. The build delay was extended to 3 weeks
I'd consider it stable at this point
My Commodore completions registration method for the command:
public static void registerCommodoreCompletions(Commodore commodore, PluginCommand command) {
commodore.register(command, LiteralArgumentBuilder.literal("explode")
.then(RequiredArgumentBuilder.argument("targets", ArgumentEntity.d())) // Single target: false, only players: true
);
}```
And registering the command and completions:
PluginCommand explodeCommand = getCommand("explode");
explodeCommand.setExecutor(new ExplodeCommand(this));
explodeCommand.setTabCompleter(new ExplodeCommand.TabCompleter());
// Check if brigadier is supported
if (CommodoreProvider.isSupported()) {
// Get a commodore instance
Commodore commodore = CommodoreProvider.getCommodore(this);
// Register commodore completions for the commands
ExplodeCommand.registerCommodoreCompletions(commodore, explodeCommand);
}
No autocomplete
I can assure you that the tab completion within the API works just fine
And again, I'm going to guess that the two should not be used together.
whats the power of a normal creeper? 5?
You can always add a debug message to see if/when the onTabComplete method gets called and what it returns
No, they work together fine.
In my setTabCompletions, I just stopped it from doing anything to test by returning an empty array, same result
Presumably they can't be used together. As far as I'm aware, Commodore has its own command dispatcher and does not use vanilla's
That being said, it's likely not working because you've registered a Bukkit command and it's taking precedence
Should those not be in an else block in the case that Brigadier is not supported?
does ItemMetas needs some kind of update() whenever i change the PersistentDataContainer of it?
Does anyone else has this problem with Reloading ResourceManager taking waaay too long in 1.15.2?
The problem is the Entity selector argument which isn't working for some reason...
about 30 seconds
@stuck quartz The meta will be updated immediately. You'll obviously need to use ItemStack#setItemMeta. Also, in certain situations you may need to set the item in the inventory.
ok, thanks
I think I may be using the ArgumentEntity class wrong... could someone look at it and see if that's why?
where is the pathfindergoal MoveTowardsTarget added? its not in any of the initPathfinder()s
@stoic shell Commodore has its own discord, you'd be more likely to get support on it there
I worked with 1.8.8 for a couple of years and now I upgraded to 1.15.2, but the server startup takes enormous amount of time in comparison to 1.8.8 . I even made custom timing to see if it's really that ResourceManager and it takes 30 seconds just to start. What does ResourceManager even do? Can I patch paper and remove it or will it break the entire engine?
everything takes an enermous amount of time in 1.15
I noticed that with loading chunks too
yes, 1.13 fucked chunk loading and everything related to it
Yeah I asked hours ago and got no response...
That's something that I would have to benchmark because I need to load arenas for minigames and in 1.8 you would just load a world and no biggie - it works, but idk if in 1.15 it wouldn't be faster just to paste a schematic with something like fawe.
I don't think it's commodore though, I think I'm using the ArgumentEntity class wrong...
imagine using fawe on prod
is it bad?
i know about lightning bugs
but other than that
i had good experience
I'm just trying to avoid writing custom block placer
there is a reason behind why it's called fast async world exception
oh
it's supposedly more stable these days but i would still steer clear of it
If that's the case then either world loading (if it's fast enough) or custom schematic pasting
oh wow
I saw this 1.13 CommandAPI plugin api, and it looks like it makes all this a ton easier and does exactly what I want, lemme look at that...
Can I patch paper and remove it or will it break the entire engine?
You're in the wrong server
just use ACF
You're asking how to use fork-exclusive tooling in the upstream Discord
I just don't understand anymore
I am not asking how to use it
I am asking if I was to remove ResourceManager loading will the spigot break
To my knowledge the only reliable way to modify vanilla server is through patching.
While working with server software that may very well break due to changes they've made
If you're using a fork, you should be asking these questions there... not here
when I try to build 1.16.1 with the BuildTools.jar I get the following error
Rebuilding Forked projects....
applyPatches.sh: line 6: $'\r': command not found
applyPatches.sh: line 7: syntax error near unexpected token `$'{\r''
applyPatches.sh: line 7: `applyPatch() {
'
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, applyPatches.sh]
at org.spigotmc.builder.Builder.runProcess0(Builder.java:818)
at org.spigotmc.builder.Builder.runProcess(Builder.java:755)
at org.spigotmc.builder.Builder.main(Builder.java:617)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34)```
how to buy plugin bedwars andrei1058?
oh boy
Yeah, my bad. But still if anyone knows how does ResourceManager work and what does it do I would be thankful for the clarification. As I've said before I worked most of the time with 1.8 and I didn't see such magic then.
you will probably get a faster response on the paper discord tbh
can anyone help? :P
what plugin lol
Premium BedWars1058 - The most modern bedwars plugin. [bungee/multiarena/shared]- GET IT FOR FREE ON 1ST...
ahh yes
another premium bedwars plugin
one of the 100 or more already existing ones
how to buy?
you dont
you look for other ones wich are free
wich are most likely better than it
the changes that im making to PersistentDataContainer is not saving
where can I get support when I encounter an error when Building Spigot with the buildtools?
most of Polish servers use it.
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
I can't write in english lolz
then i dont suggest making a minecraft server
as every configuration file isi n english
then what should I do if I encounter applyPatches.sh: line 2: $'\r': command not found Rebuilding Forked projects.... applyPatches.sh: line 6: $'\r': command not found applyPatches.sh: line 7: syntax error near unexpected token `$'{\r'' applyPatches.sh: line 7: `applyPatch() { ' Error compiling Spigot. Please check the wiki for FAQs. If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support. java.lang.RuntimeException: Error running command, return status !=0: [sh, applyPatches.sh] at org.spigotmc.builder.Builder.runProcess0(Builder.java:818) at org.spigotmc.builder.Builder.runProcess(Builder.java:755) at org.spigotmc.builder.Builder.main(Builder.java:617) at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:34) when trying to build 1.16.1
you can make a polish minecraft server then
most of configuration files these days are pretty easy even with google translate lol
yeah its definetly gonna be a nice experience
@craggy jolt delete the CraftBukkit (and Spigot) directory and re-run
googel translating every single word
You should be fine to keep the Bukkit directory
why?
@subtle blade same error still appears
@frigid ember
transkacje przez paypala są wyłączone pewnie coś popsute (paypal transactions are disabled, probably somethings is broken)
Really? You've deleted CraftBukkit and Spigot directories and re-run already?
I seriously doubt that considering it takes a few minutes to build
maybe he is running on a NASA Computer, you dont know 😄
I did here is the log you can see at the start that it cloned spigot and craftbukkit https://hastebin.com/nexavunufi.bash @subtle blade
yeah, you 'll probably need to wait a bit until the paypal system is on again
Hi, how to use RGB colors in TextComponent object?
Let me see if md made a commit recently that may have broke BuildTools
because that's a syntax error in the script somewhere
Will anyone recommend a free bedwars plugin?
i built it like today for testing purposes, it worked
md obviously broke it
applyPatches hasn't been touched for a year and a half now, so it's not that
so, what should I do then?
You've not edited Spigot/applyPatches.sh have you?
no
and its going..
Hugo, copy and paste that exactly into Spigot/applyPatches.sh
(i.e. replace the current contents of the file)
what should i do if PersistentDataContainer is not saving the changed data
"Success, everything compiled correctly!"
Are you re-setting the modified ItemMeta?
Additionally, are you re-setting the item? (Assuming you've pulled it from the inventory)
are you re-setting the item? (Assuming you've pulled it from the inventory)
yes
its still not working :/
What OS are you running Hugo?
windows 10
@stuck quartz Did you make sure to #update the state?
How do I come up with good rank names. I would like 3-5 names please.
You could look up old games nobody plays anymore and look at the different "classes" or "types"
ok
@stuck quartz I've never had a problem with persistent data. Did you make sure the bit that sets the persistent data is actually run?
Another problem could be when something else grabs the state before you and updates after
Anybody got a world management plugin that works for 1.16?
ive added some debugs, and all they print out correctly
Another problem could be when something else grabs the state before you and updates after
@wraith thicket im not sure, but i can check here
did BlockPlaceEvent change or am i doing something wrong?
Do you have a question/issue? @sinful spire
Did you annotate @EventHandler?
Did you register the listener?
yeah, both of these
i cant get votifier and galistener to work
@subtle blade I deleted everything an rerun the buildtools and the error still pops up :/
why not use ACF
I can't use 1.13 CommandAPI because of the dreaded java.lang.NoSuchFieldException: modifiers problem cause they're trying to make something non-final with reflection. I posted a solution on a github issue it was discussed on a few days ago... I use Java 14, so until that's fixed, I can't use CommandAPI.
i'm not talking about commandapi
ACF?
aikar's command framework
just looked it up, but it looks like it's just gonna add more complexity
Another problem could be when something else grabs the state before you and updates after
@wraith thicket nop
im going to check another time
i dont trust myself
How would I get if the player is in a boat
Entity boats = event.getEntity().getVehicle();
if(!event.getEntity().equals(boats)) {
return;```
So this’ll get the vehicle the entity is in :/
Entity#isInsideVehicle
Or if you want to check specifically for a boat
You need to do get vehicle and check the type of the vehicle
Just need to get wether the placed entity is a boat
Or vehicle
There are no other vehicles :p
Wdym
A Vehicle is a subtype of Entity
if the boat is being placed, it throws VehicleCreateEvent as well as EntitySpawnEvent
@wraith thicket nop
@stuck quartz nothing else is grabbing the state
heres the code for it
LockUI LUI = Checurity.PublicLockManager.get(inv);
BlockState signState = sign.getState();
PersistentDataContainer container = ((Sign) signState).getPersistentDataContainer();
PersistentDataContainer item_container = clickedMeta.getPersistentDataContainer();
String playerName = item_container.get(Utils.key_item_player, PersistentDataType.STRING);
PersistentDataContainer permissions = container.get(Utils.key_permissions, PersistentDataType.TAG_CONTAINER);
NamespacedKey namespaced = new NamespacedKey(ChestSec.plugin, playerName);
Boolean hasPermission = permissions.has(namespaced, PersistentDataType.BYTE);
if (hasPermission) {
System.out.println("banana");
permissions.remove(namespaced);
} else {
System.out.println("apple");
permissions.set(namespaced, PersistentDataType.BYTE, new Byte("0"));
}
signState.update();
signState.update(true);
inv.setItem(e.getSlot(), Utils.newPermGlass(playerName, permissions.has(namespaced, PersistentDataType.BYTE))); // This is creating a ItemStack with given arguments, and its not the problem at all, i checked it
its printing out "banana" and isnt saving the data on the sign
why do you cast signState back to Sign? o.O
Sout best debugging
Yes?
Sout best debugging
@sturdy oar i had to remove some debugs, and theyre printing out all right
its a wg event
SpawnEntityEvent so like EntitySpawnEvent
but with things added
'worldguard'
This isn't particularly a coding question more of a any idea what the issue is kinda thing. I have these plugins installed and for some reason the perms don't work at all. Any ideas:
remember that getVehicle is nullable
configure your perms @marble ingot
why luckperms_bukkit then
they were working until someone moved dimension
so if ('event.getVehicle()' != null) {
Because that's the version you use for Spigot...
but I would still have to get what the spawned entity is
i had luckperms-spigot a few weeks ago
wether it's a boat
@sturdy oar
what're we talking bout
idk but perms still arent workingg 😄
its when they travel to a different dimension
all perms just break
you probably have per-world perms setup
^^
no cause when they go back to the original world all perms dont work again
no errors?
Ok so
make sure you're typing the command right
MSWS
if i op them they dont have perms unless they have the role
@stuck quartz I see you've got an entire container saved on the sign. Have you tried (re)setting the permission container to the sign? Perhaps uploading data within the inner container isn't updating the outer one? In all fairness, it should, but worth a shot
im tryna get if the placed entity is a vehicle
dont op
its only friends on my server
@stuck quartz I see you've got an entire container saved on the sign. Have you tried (re)setting the
permissioncontainer to the sign? Perhaps uploading data within the inner container isn't updating the outer one? In all fairness, it should, but worth a shot
@wraith thicket like, overwriting the permission container with a new updated one?
@torn robin ?
Just container.set(Utils.key_permissions, PersistentDataType.TAG_CONTAINER, permission)
if entity instanceof Vehicle
ok, ill try that
hey can i gte help with chestcommands
so what i am trying to do is:
when u click the chestw ith the red circle, it sends u to another chestcommand menu
ty
Entity entities = event.getEntity();
if (!entities instanceof Vehicle)
(!(entity instanceof Vehicle)) **
oof ty
@wraith thicket oh my fucking god that actually worked
To be honest, I'm not sure if that could be considered a bug
entity is not a boolean, you can't invert it
unary operators have the highest precedence so they will be processed before instanceof
Literally on the next line I already corrected them lol
yes but this is the reason why what he posted doesn't work
But it's not really an issue, any half decent IDE will be able to tell you there's an issue.
myes
Vanilla commands are in... the vanilla server
But where's their code in spigot? (the spigot jar in project libraries)
It will be in the net.minecraft.server
The mojang code is inside NMS
Well I've been looking for 15 minutes, and I haven't found a single command class in that jumble of classes.
Oh wait nvm...
Their names are reversed.
Figures
ctrl-f is your friend
No I mean it's, for example, CommandTell instead of TellCommand.
$ ls CraftBukkit/src/main/java/net/minecraft/server/Command*
[--]/CommandBlockListenerAbstract.java [--]/CommandGamemode.java [--]/CommandReload.java [--]/CommandTime.java
[--]/CommandDispatcher.java [--]/CommandGamerule.java [--]/CommandSpreadPlayers.java
[--]/CommandEffect.java [--]/CommandListenerWrapper.java [--]/CommandTeleport.java
Yeah I was scrolling through with my IDE.
Why in the world are the classes not mapped to packages?
that is because there is a certain convention in Java that is used to help identify classes
Well yarn does it...
Vanilla does use proper packages. CraftBukkit shifts all of NMS's into a single net.minecraft.server package
why?
Easier to patch
🤦♂️
Does anyone know how to use chown?
I'm on CentOS 7 and I'm trying to solve a multicraft error that makes files that I upload via FileZilla not work with the server
@stoic shell hey,
Hi.
$ ls CraftBukkit/src/main/java/net/minecraft/server/Command* [--]/CommandBlockListenerAbstract.java [--]/CommandGamemode.java [--]/CommandReload.java [--]/CommandTime.java [--]/CommandDispatcher.java [--]/CommandGamerule.java [--]/CommandSpreadPlayers.java [--]/CommandEffect.java [--]/CommandListenerWrapper.java [--]/CommandTeleport.java
@wraith thicket you could've used grep right there
Would have been a much greater Linux flex
I could have - it looked nice on my screen but then pretty bad here so I just edited out some of it 🙂
Oh my issue comment on CommandAPI got a reply from the dev.
Currently opening my IDE on my fabric mod just so I can look at the fabric-mapped version of classes, so I don't go insane.
I'm really confused, I though nms was obfuscated? How does the craft bukkit folder that you get when you compile spigot de-obfuscate it?
Spigot has their own mappings IIRC.
mappings?
I swear this violates spigots obfuscation guidelines lmao public boolean isTicking(IBlockData iblockdata) { return this.av; }
wtf are these method names public boolean a(Block block) { return this == block; }
use mojangs mappings
where can I find them?
same place you can download the client and server jars
and what do I do with them when I get them?
thanks
once you get the mappings, you need a program or create your own program to apply the mappings
What I posted is the mappings viewer
the mappings are in proguard format just fyi
Or if you just want to view sane deobfuscated code, you could use Enigma
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
public void onBlockPlaceEvent(PlaceBlockEvent event) {
Object cause = event.getCause().getRootCause();
if (cause instanceof Player) {
if(!event.getEffectiveMaterial().equals(Material.WATER)) {
return;
}
Player player = (Player) cause;
for(Block block: event.getBlocks()) {
//System.out.println(block.getType());
if (waterFlagEnabled(block, player)) {
event.setResult(Event.Result.ALLOW);
}
}
}
}```
under the assumption that unobfuscated code is more confusing then obfuscated o.O
So I did this in order to let people be able to place water in regions
it works
but
you do realize there is an item use flag
*deobfuscated
I'm now doing the same for vehicles
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
public void onSpawnEntity(SpawnEntityEvent event) {
Object cause = event.getCause().getRootCause();
if (cause instanceof Player) {
Entity entities = event.getEntity();
if (!(entities instanceof Vehicle)) {
return;
}
}
Player player = (Player) cause;
for (Entity entity : event.get) {
if (boatFlagEnabled(entity, player)) {
event.setResult(Event.Result.ALLOW);
}
}
}```
but im totally stuck at the for-each loop :/
There is no SpawnEntityEvent in the API
no
So I'm not sure what you're using
worldguard event
they are using WG @wraith thicket
Well, that'd be something worth pointing out then
How hard would it be to make spigot use yarn mappings?
yarn?
...
Yarn is a set of open, unencumbered Minecraft mappings, free for everyone to use under the Creative Commons Zero license. The intention is to let everyone mod Minecraft freely and openly, while also being able to innovate and process the mappings as they see fit.
You don't
Stop trying to use other mappings
If you want to use other mappings, you create a fork
oh instead of that, someone could probably make a system where you code using a de-obfuscated mojang code then run it though some system and convert it to the mojang obfuscated junk
any1 got a clue? ^ 😐
You're making your life a hell of a lot more difficult for absolutely 0 benefit if you want to translate your code between mappings
Learn CraftBukkit's mappings
but they are like a b c d e f g
who remembers that
They're not
CraftBukkit maps what it needs
If they're still obfuscated, it's because CraftBukkit need not obfuscate them. NMS isn't supported
but what if you need something like pathfinding?
If you're using it, you should be capable of reverse engineering it to figure out what it does
Choco, do you know things about the WorldGuard API or nah?
They have a discord with an api channel I think.
lol
not specifically spigot btw
'another'
while im using their api :/
@mental field
isnt this my first ping?
the we/wg guys hate my guts
Man idk
ohh but thanks for thinking :p
gl with wg/we api
thanks 😐
the documentation for that shit is more scarce and outdated than the evidence for the lizard men being behind 911
everything is from like 5 years and 2 major rewrites ago
and the scary part, is in their discord server they except you to understand everything.
Please dont say this isnt really a wg api question
wizjany vandaag om(today at) 00:29
it really isn't
wizjany 😂
yeah it definitely doesn't help that the main guy behind the umbrella is the fucking wizjany
like not to shit on the guy i'm sure he's nice irl and all but definitely not the most resounding help desk service vibes i've gotten from him
he has kicked me from paper discord far too many times
y'all know he's in this discord right
he left
oh
he has kicked me from paper discord far too many times
@pastel condor I got banned fair enough
Where is our FAWE boy
lmao
he kind of crawled under a stone after getting doxxed to shit
Where is our FAWE boy
He left too
not that i don't understand
he kind of crawled under a stone after getting doxxed to shit
Who?
wiz
wait what
oh
Well there is a reason i dont put my real name on anything
maybe i shouldn't have said that? i assumed it was common knowledge lol
Oh, and it seems I am still banned from the paper discord by wizjany for presumably "being annoying".
A nice and well thought ban reason i see
Can we not talk about paper ban in discord spigot help channel
we should probably move to #general
general doesn't exist
yeah moving
how to make everyone telelport
You loop
like be able to teleport
Player#teleport(Location) ??
/lp group <group> permission set essentials.fly
depends on the plugin you have for teleporting
Lookup EssentialsX permission
I don't remember them by mind
ok
if i wanted everyone to be able to do /back whenever where would i type this
essentials.back
and what would i type
/lp group <group> permission set
Unless you made a custom group, yes
Doesn't matter
what is command for my friend (not op) default group to open chest and other stuff @ me
@cursive umbra figure it out
