#help-archived
1 messages Β· Page 183 of 1
how do i prevent SPECIFIC blocks from exploding from a bed in nether
It's clearly 71. https://i.imgur.com/65pliLg.png
Then you too might want to take a colour blind test, Alter π
no
@stuck quartz you can look at BlockExplodeEvent
ok, thanks a lot
No, like, I'm serious lol. If you see 21 or 71, there's a chance that's colour-blindness
Take some tests
The actual number on that image is 74
that's a lot of work
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
β¬ββ¬ γ( γ-γγ)
scam
I have an eventhandler
@EventHandler
public static void onSpawn (CreatureSpawnEvent event) {
if(event.getEntityType() == EntityType.WITHER) {
if(event.getSpawnReason() instanceof )
how would I get the player that spawns the wither?
Could check the player in a 3 block radius
but how would I get the player from that?
Oh you want to get the Player. You'd have to listen for BlockPlaceEvents
could use the blockplace event
Why must Spigot javadoc update mess with my dark theme, https://i.imgur.com/OVumWGA.png
π€’
DarkReader?
no, Stylus
If the CreatureSpawnEvent is called within a 1 or 2 tick time frame after BlockPlaceEvent for a wither skull or soul sand, that's the player
recommend setting an object value of like the location or something from the build_wither event π
Or block place event
works on DarkReader
where it has the player info for you, and location, then its just a matter of using that in one of the other events
Don't forget, you can now build a wither with Soul Soil, so you'll need to check that too
What number is it now? https://i.imgur.com/UGxiMzm.png
Is that supposed to have a distinct number? π
because unless you try really hard, there's no number there
i see a 0 there
it's all different shades of purple
Yeah with seemingly no distinct pattern
Is that supposed to have a distinct number?
Nah just color changed it xD
Figured as much
unless you try really hard, there's no number there
because I was trying to see 74
what, excuse me, what
It's the same 74 number image, just differently colored
He just colour shifted the original image
What good math operations could I use to make an experience system that keeps getting harder to level up?
I had many dumb equations
Often a good idea to play around with exponential equations in a math engine like Wolfram Alpha
((x+2-(x^2/5)*((xlog(xz)/x^2)100) * -1/x * z/z/c)log(z)log(x)log(zx)/x)*(x/z)
if x = any number
z = 100
c = -1```
see?
dumb equations
I used that at one point but scrapped it
That ends up with this thing, https://i.imgur.com/mIlgVtK.png
is that what you showed me?
i used ((level * 1.43) + Math.PI) * 0.93 idk why
generally the easiest way is tossing a percentage in there
Another weird looking equation, https://www.desmos.com/calculator/dwhryflutt
but percentage could make it too hard I think
or you can go with the infamous bell curve type
but then it starts to punish players that are good and supports players being bad XD
there is many ways to go about it
or you can go with the Alaskan Bull-worm https://www.desmos.com/calculator/7yk5uezmsl
and there isn't really a correct way either
its really just identifying how far you want the system to go
and how rapidly do you want it to increase in difficulty π
oh wow
anyone know what minecraft uses?
x! is fascinating.
level * 2 if you want your users to quit π
lmao
minecraft uses java
double the difficulty for every level they gain
lol
yeah that will ramp up the difficulty XD
or if you want your users to go mad level^2
lmao
lol. Just exponential. I like it
im good at making people mad π
Good luck with level 10, mother fuckers
Minecraft uses basic stuff, https://i.imgur.com/xsqz8Vy.png
ohh
just toss a negative in there too @sinful spire π
what minecraft uses for levels, im dumb
always fun to play with a flip flopping system. Every other difficulty is difficult and the difficulties in between are super easy so there is no getting used to it π
There is many game algorithms out there, and always new ones being created
if(player.getLevel() == 10) {
resetLevel(player);
}``` haha
Should just divide their level by 2^2^2^2^2^2^2
I still think you should use Level!
whats Level?
oh boy, factorial is another way to lose users
thats too much for js
It's too much for google as well
0.1 + 0.2 = 2.999...8 in js
can go with this if you want https://www.desmos.com/calculator/qwvb1wsumy
and that's why we hate float and double
gives a nice slight upward trend and then in the higher levels starts to ramp up
nextLevelXP = currentXP + 1
doesnt it become impossible towards the end?
eventually if you never define an end
When i want to calc experience formulas i grab something like Maple and just plot it so i get a feeling for the curve.
inb4 someone wants high experience for "OP" servers
Fucking Maple
A good leveling system V
It's been forever since I've used Maple lol
that's a good leveling system indeed
making it negative should make it face the right way, yeah? π€
lol all over the place with that
or this one
okay thanks guys I will look through all the suggestions and find something that suits me
https://www.youtube.com/watch?v=l06PlYNShpQ
You can even play doom on calculators
Get 10% Off XSplit Vcam with offer code LINUSTECHTIPS at https://xspl.it/lttvcam
It is natural to fiddle with your calculator while bored in math class. Maybe you installed some games, wrote some programs, or made art... but what if we took it to the extreme.. with water cool...
They've ported Doom to everything I think
i ran Doom on a Fridge in a shop so yeah.
@tacit trellis just play around with graphing stuff until you find something you like
also I have another question, is it possible to add my own methods to Player? like player.getLevel() for example?
but just remember, if you don't define the upper limit, it will eventually become impossible at some point lmao
@tacit trellis You need to fork spigot for that
okay
yeah, i need that one too for some stuff dont think its possible with my java knowing
I could do that
Or... you could inject bytecode. XD
idk what that is
It would be much easier to make some sort of wrapper or adapter class for that
injecting bytecode isn't always an ideal thing to do lmao
Its mostly a bad bad idea
Yes what CraigPatron said. Write a wrapper class.
you mean like βCustomPlayerβ class for example and then getPlayer()?
Yeah, but make sure you store your player reference as a UUID
sometimes I love this community, given enough time we can give you a bunch of useless useful stuff in which most of it might be interesting but probably won't use π
we can give you a bunch of useless useful stuff
yes, like Choco is dumb
You dont absolutely have to use an UUID for mapping players. I too was in the team "no game object references EVER"
But if you properly manage your references you can just use Player object.
What makes sure his custom player ever releases the reference?
For the extra overhead of ensuring the reference doesn't persist too long, in my opinion, it's easier just to store a UUID
yea, but then getPlayer turns into a map lookup
Which, sure, probs ain't an issue for most cases, but, if you can avoid it π€·ββοΈ
yup, which isn't a big deal
You'll wanna be disposing of your custom player objects when people log out anyways
You have a Map<Player, WrappedPlayer>. The WrappedPlayer also encapsulates the Player.
If you remove the Player from the Map the GC will collect the wrapped player.
Then from the WrappedPlayer you either only have something like Consumer<Player> for interaction.
Or you only pass a WeakReference<Player> outwards
Just remove the Player when logging out.
does reflections work in a minecraft plugin?
Sure that can work, when done properly
Yes reflections work in Java...
That's a broad question David
org.reflections?
yeah
I dont know that package...
its not from the standard library
public class CoolChicken extends EntityChicken
{
public CoolChicken(Location loc)
{
super(EntityTypes.CHICKEN, ((CraftWorld) loc.getWorld()).getHandle());
this.setPosition(loc.getX(), loc.getY(), loc.getZ());
this.setCustomName(new ChatComponentText("Cool Chicken"));
this.setCustomNameVisible(false);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, false));
this.goalSelector.a(4, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(0, new PathfinderGoalHurtByTarget(this, EntityHuman.class));
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, Entity.class));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
}
}
I have a chicken
If you're using another library make sure your dependencies are setup properly
but when it attacks it disappears and leaves this error
java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage
how would I add minecraft:generic.attack_damage
XD a fighting chicken. Did you try giving him the attribute?
no I don't know how to do that
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.12</version>
</dependency>
</dependencies>
```what else do I need to add?
What version are you on sticky?
1.16.1
Ok ill dig a bit.
thank you
If the dependency is loaded correctly it should work. Is the Reflection class you seek in that version of the library?
yeah
at com.david.specialwolves.Main.onEnable(Main.java:23) ~[?:?]
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) [?:?]
Caused by: java.lang.ClassNotFoundException: org.reflections.Reflections
at java.net.URLClassLoader.findClass(URLClassLoader.java:436) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:146) ~[spigot.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:92) ~[spigot.jar:git-Spigot-800b93f-8160e29]
at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
... 10 more``` that is what I'm getting
But you can compile?
Then shade the dependency
I got ClassNotFoundException once when i used spigot 1.15.2 as a dependency on a 1.16 server
maybe that's it?
my server and plugin are both 1.15.2 though
I dont know if I'm skilled enough to shade lol
No your problem is that a chicken does not have an attack attribute. So the server cant calculate the attack damage.
Im currently looking at the AttributeBaseMap but it seems like you are going to need reflections to access the attribute map and
add new AttributeBases
But im not done looking
how can I change the biome of my entire world ?
that would be hard without a small world
Not too hard. I just wrote a plugin for someone that gets every single chest in a World.
2 lines changed and it can do anythin else with every chunk in a world
Wait. I think i even wrote an api for that. Wait a min
https://www.spigotmc.org/wiki/spigot-maven/
I've just tried replacing my jars with dependencies, but this tutorial doesn't seem to add the Entity__ type of Classes
is there another dependency I need to add?
Is it possible to use Bukkit Events when I fork spigot? For example I could make a spigot fork that sends a player a message on PlayerJoinEvent
yes
Can I just make a new class and so it the exact same way i would with a plugin and register it in onEnable or no?
Thats how you use it. Here for example i placed on gold block in corner of every chunk
Currently the time per tick is hardcoded to 39.5ms. I'll post another version in a min where you can pass that in the api call.
π€
easy*
It even writes the progress in the console π
And you can play while this is happening. If you pass 10ms the tps wont drop as you iterate over the chunks.
inb4 potato pc
how can i get DoubleChest from Block
Here you now can pass the max millis per tick the iterator is allowed to take.
start(world, Consumer<Chunk>, millis as double)
@stuck quartz Essentially you get the chest. get the inventory holder. check if that is instance of double chest.
Is there any possible problem for Reflections not being recongnize? This is my pom.xml```
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>artifact</artifactId>
<version>V2</version>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.12</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
</project>```
@grim halo how can i cast a InventoryHolder to a DoubleChest
(DoubleChest) InventoryHolder
Basically yes.
He just said it
- You get the chest.
- Get the inventory holder.
- Check if that is instance of double chest.
You just need to check if its actually a double chest.
Slot size π€
ok, thanks
@polar gust If you want to access nms you need
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
wait I thought there was something else
Im using a jar instead
I thought the NMS one was craftbukkit
or wait...
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
it doesnt work for me, apparently you have to do something with buildtools
Im just gonna use a jar
I'm just confused about reflections not working
You just need to run BuildTools once and everything gets automatically installed in your maven repo
oh let me try that again, I dont think ive ran it in a while
how can i get Block from InventoryHolder
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/InventoryHolder.html
Go here, Then > Inventory and search for a method that could suit you. (I saw at least one)
declaration: package: org.bukkit.inventory, interface: InventoryHolder
im going to try
((BlockInventoryHolder) doubleChest.getLeftSide()).getBlock()
is there any reason that reflections wouldnt be recongnized?
is there a way to limit lag caused after sending a player sendblockchange (is it lighting?)
I'm reading about NoClassDefFoundErrors, and the most likely reason seems to be that I define the class in a ClassPath attribute, but is there even such thing in this?
NoClassDefFound Exception happens when you depend on something and that something isn't present when it comes time to invoke it
As i told you. Shade your dependency
I guess I'll learn to do that. Is it difficult?
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
Add this to your pom
Ah and change ${java.version} to 8 or whatever you want
1.8*
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
``` This isn't necessary to add
do I need any changes in any of the other code? Like references to the dependencies?
Nope. Default scope is compile so you should be good to go.
just realized that running mvn install makes 2 jars, one original
whats the difference? is one without shading?
yes
Which one is the one without shading though?
assuming its the original
public static Object getPrivateField(String fieldName, Class<?> clazz, Object object) {
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
return field.get(object);
}
catch(Exception e) {}
return null;
}
@SuppressWarnings({ "unchecked", "rawtypes" })
public static void register(String name, int id, Class<?> registryClass) {
((Map) getPrivateField("c", EntityTypes.class, null)).put(name, registryClass);
((Map) getPrivateField("d", EntityTypes.class, null)).put(registryClass, name);
((Map) getPrivateField("f", EntityTypes.class, null)).put(registryClass, id);
}
```I've also literally copied this code from someone for registering code, does this work? I'm getting NullPointer in the first line of register
Did you work with reflections before?
I basically just used it for checking annotations
Work with Nullable and NotNull annotations so you dont run into problems with your arguments beeing null.
Did you make sure that name and registryClass are both not null
Also you try to get the field value from a null Object...
You can only do that with statics
I know the values I input into register are not null
I dont really know how registering even works, so I just copied this from someone, so I dont really know why its getting fields from null
Are you on 1.16? Also whats the registryClass
Registering custom entities? Fun times
I'm on 1.15.2, registryClass is about 10 class that are all child of EntityWolf
Registering entities was why I quit minecraft plugins like 3 years ago lol
from 1.12 to 1.13 I couldnt find how to register entities
Last I did it was 1.14
And I'll have to do it again soon in 1.16, and it's probably changed 500 ways
Now I'm getting AuthorNagExceptions telling me that I forgot to define the api-version as 1.13, why does it think it should be 1.13?
depending which version, that is the lowest supported api version for legacy stuff
set the api version to whatever you are compiling against
so if you compiling for 1.16, set it to 1.16 for api-version
Is there a flag to disable the vanilla console window when starting the server?
--nogui
7smile7 there is this spigot thread. In Deerjump's reply, do you know what type and model are?
I would guess type would be like EntityType.CHICKEN or something, but I have no idea what model would be
in plugin.yml, I have to set api-version to 1.15?
if you're using 1.15 then probably yes
@lyric cypress Ah that exactly what i was doing earlier. Yes the type would be CHICKEN but the model i would need to check myself
the bukkit wiki really should update their doc on plugin.yml
@polar gust and who exactly would you want to do that?
last I checked there is no more bukkit people XD
oh shoot what happened
yeah you can use the forums and what not, Curseforge just does the minimal necessary to keep that stuff running
but they are not going to do any updating of bukkit stuff
Help Im making a minecraft faction server with some friends
But we want to play in the latest version 1.16.1
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
DEFAULT_ATTRIBUTES.put(type, X); where X is of type AttributeProvider
Could someone please list a few of the essential plugins for 1.16 because most that i download are for plder versions
how do i nstall a plugin into my serber
put it in the plugins directory
I believe 1.16 is pretty new
drag the jar into the plugins folder
not sure how that is relevant but ok
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
is there a guide for registering entities? the 1 forum post I found doesnt work: https://www.spigotmc.org/threads/adding-a-custom-entity-into-the-game.415812/page-4
Probably not an easy thing to find
Might be best to find an open source plugin that does it
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());
DEFAULT_ATTRIBUTES.put(EntityTypes.CHICKEN, EntityInsentient.p().a());
this.setPosition(loc.getX(), loc.getY(), loc.getZ());
this.setCustomName(new ChatComponentText("Cool Chicken"));
this.setCustomNameVisible(false);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, false));
this.goalSelector.a(4, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(0, new PathfinderGoalHurtByTarget(this, EntityHuman.class));
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, Entity.class));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
}
}
now I have this
how do I add attack damage?
is there a way to display some player a sign and get his input?
ye
how
Add an instance of AttributeProvider to your DEFAULT_ATTRIBUTES map.
Sticky jesus that code
not that
try explaining it in a different way
ok
i want to display a sign in the player screen and then get his input when he finish writing
wait is there no good way to register entities?
ok what do you mean by displaying a sign
a message to their screen?
and then wait for a player type something in chat
no, a empty sign, that the player can write in
A
you know when you place a sign and it shows up a gui to write the lines?
is there a way so i can display that sign gui
u want to play a sign in front of them?
u want to force a player to open a sign?
yes
It is.
Only way to obtain text is through NMS afaik
Well. Actually. You should be able to do it via the sign events.
but how do i force open the sign gui
yeah how do that im curious
@grim halo
AttributeProvider provider = EntityInsentient.p().a(new AttributeBase("minecraft:generic.attack_damage", 2.0D)).a();
DEFAULT_ATTRIBUTES.put(EntityTypes.CHICKEN, provider);
I did this but it says:
The constructor AttributeBase(String, double) is not visible
How should I create an AttrivuteBase
AttributeBase
You could also do it with packets
nothing works i cant install plugins
7smile7 what do I use as the AttributeBase?
Can you get a EntityTypes from id?
Any idea why the memory builds up and then does a dump every few intervals?
It does this without plugins too
how hard would it be to convert a plugin to bungee?π€
how hard would it be to convert a plugin to bungee?π€
@balmy sentinel depends...
on?
it's like a medium-sized plugin, maybe 4-6 commands
uses a database to store everything
@frigid ember that is GC doing its job
everytime it hits a certain limit as noted by your graph, GC starts getting to work to free up some memory by removing objects not needed anymore, and thus it goes back down π
thats what i thought, thanks!
does the bungee api shaded into spigot 1.16.1 no longer support ChatColor?
It should have the class
Hello, I Have 2 Servers But Not Bungee Hosted. I Want To Be Able To Connect To Them Without Having To Leave The Servers. I Want It To Be In A Server Selector. Is That Possible?
ah I see, class instead of enum
someone is getting NoClassDefFoundError on my plugin on 1.16.1
π€
it weird
IDK why but on 1.16 check.getLocation().getBlockX() >> 4 is erroring x out of range (expected 0-15, got -10) Any ideas?
they are using paper tho
Hello, I Have 2 Servers But Not Bungee Hosted. I Want To Be Able To Connect To Them Without Having To Leave The Servers. I Want It To Be In A Server Selector. Is That Possible?
U need bungee to do that
@pastel arrow You are trying to get the block inside a chunk? Because there are only x and z of value [0;15]
Theres No Way U Can Do It Without?
failing on converting a BaseComponent to string
Then use server selector
You are trying to get the block inside a chunk? Because there are only x and z of value [0;15]
Yes and please read the code.
To conncet using bungeecord
@pastel arrow The code snippet you posted makes no sense.
I forgot the negative portion. I fixed it.
Thats an arithmetic operation and wont throw this error ever
@grim halo
AttributeProvider provider = EntityInsentient.p().a(new AttributeBase("minecraft:generic.attack_damage", 2.0D)).a();
DEFAULT_ATTRIBUTES.put(EntityTypes.CHICKEN, provider);
I did this but it says:
The constructor AttributeBase(String, double) is not visible
Then get the constructor using reflection and set it accessible
Or search for another constructor that takes a minecraftkey
So you masked the sign bit away. Still... try to post a bit more context next time pls
π
Anybody know a good vanish plugin that can hide players from a bungee tab list plugin like BTLP?
@inland oxide only thing I can think of is that they are using an outdated bungee version in comparison to the mc server
or a custom bungee version
or maybe a waterfall version?
that could probably do it
Huh... so ((check.getLocation().getBlockX() >> 4)& 0xF) is returning 6 when its at 10 in the chunk.
If I put 6,80,6 it still uses 6,80,6 tf?
I'll ask what they are using
but it shouldn't make a difference if Spigot shades in the bungee api.
it does if they used an outdated version to shade in
they as in "**per"?
well just because it is paper doesn't mean they couldn't have compiled it themselves
but generally this is the result of either using a different but similar dependency
or just outright using an outdated dependency
let me look at the commits and see what they are using
wouldn't surprise me if the version being shaded in is 1.13 lol
somewhere that api method was altered
yes, however that is between you, the plugin author and paypal
technically 4 days old @inland oxide
seems there is a fix in the latest version as well
in regards to chat color
recommend they update @inland oxide π
and this is how a fork can be responsible for problems even if it doesn't seem apparent at first π
I figured it out...
location.getBlockX() >> 4 is to get the chunks X coord.
location.getBlockX()& 0xF is to get the coord of the block in the chunk.
how do i force open the sign gui and then get what the player wrote
i saw a server with something like that, but i forgot which server
you can get what they wrote once they close it, but only works for newly created signs
but you can't force open the sign editor
ok, thanks
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());
I am still getting the error, no stacktrace in printed when the chicken is summoned, but when I am attacked by the chicken, I get
java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage
Am I doing it wrong?
@keen compass yeh, I gave them the spcheel about how stuff is still beta and Paper/Waterfall being downstream and such, not to get expectations up and to update frequently...
My guess is that Waterfall is too old and not playing nice.
Hey, in a plugin, how can I send a response to the console if a command from the plugin is executed from console?
if (!(sender instanceof Player)) {
sender.sendMessage(β...β);
}
Or check if it instances of ConsoleCommandSender
@lyric cypress where is DEFAULT_ATTRIBUTES from?
Perhaps thatβs more accurate
Sticky please catch ReflectiveOperationException instead
Also why use 2 try-catch blocks
Only 1 is necessary?
need to make the tile entity editable
@keen compass sorry for pinging you but you seem to know about srv records - so this is my first time setting up a srv record in namecheap, whats the protocol and service name?
Or if anyone knows
Does the lore of an item have to be visible to the player, or can I hide it from the player but still read it from the object in a method?
@inland oxide
here is the rest
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());
Class[] cArg = new Class[2];
cArg[0] = String.class;
cArg[1] = double.class;
Constructor constructor;
constructor = net.minecraft.server.v1_16_R1.AttributeBase.class.getDeclaredConstructor(cArg);
constructor.setAccessible(true);
AttributeBase base;
base = (AttributeBase) constructor.newInstance("minecraft:generic.attack_damage", 2.0D);
DEFAULT_ATTRIBUTES.put(EntityTypes.CHICKEN, EntityInsentient.p().a(base).a());
this.setPosition(loc.getX(), loc.getY(), loc.getZ());
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, false));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
}
}
Constructor constructor;
and
base = (AttributeBase) constructor.newInstance("minecraft:generic.attack_damage", 2.0D);
are surrounded in try/catch with stacktrace printing but I had to remove it because discord doesn't allow messages that long
atm we're paying something like $110/mo for shared hosting on a 7700k and a 3600x
@dreamy dawn 110? Get OVH dude
Yep, we're currently looking into dedicated hosting
Hey how do I install plugins in a Ubuntu server?
Yo if anyone can help me add plugins to my minehut server that would be great. @ me. rn i have deathcoords veinminer voidspawn but i want to add one where i can tp to a warp and tpa
No need to post in both channels
is there a way to save some information in a inventory that i created?
so when a player clicks some item on the inventory some event uses the saved information
You can use the persistentDataContainer on the item
I'm in some need of help! Currently my team and I are working on updating our server to 1.16.1 and we ran into a problem. Multiverse does not support 1.16 and we need that too transfer between worlds. I read an article about how Spigot is experimenting with multi world support, but there was no further info. I'm hoping someone can help me out with this, that would be much abliged.
@stuck quartz There are several things you can do in order to make data accessible.
One way would be saving the data in the PersistentDataContainer of the item. I dont really like that approach as it makes it harder to
maintain the same GUI for multiple people.
If you have to store information inside of a inventory then your data structure might be messy.
Why do you need to save something in the inventory?
@median bridge You have 2 options:
- Wait till multiverse updates
- Write your own sollution
Thank you for the strait forward answer, I was worried that would be the case, but we will try our best to make with work π
@median bridge Wait a min. My co-dev just told me he wrote his own worldmanager. Maybe it works for 1.16
https://www.spigotmc.org/resources/worldmanager.60540/
i'm making a plugin to secure chests, and it saves data on the sign with PersistentDataContainer
i made PlayerInteractEvent create a inventory with a item with it whenever you right click the sign
and InventoryClickEvent is being used to handle whenever the player clicks the item
and both of these events are in different java files
when you click the item, a value in the PersistentDataContainer on the sign should change
the problem is that i don't know how i could get the Block of the sign so i can change the value
@grim halo on the Spigot page it says it supports up to 1.15
*he didnt test it for 1.15. Load up local server and try it.
Yo if anyone can help me add plugins to my minehut server that would be great. @ me. rn i have deathcoords veinminer voidspawn but i want to add one where i can tp to a warp and tpa
@stuck quartz This sounds like you should have a wrapper for your GUI.
Simple solution:
- Create a Map<Inventory, Sign> as soon as the inventory is created.
- InventoryClickEvent -> get sign from map -> change sign.
Proper solution:
- Create a class "LockGUI" (or something)
This class inherits the Sign as well as the Inventory.
It has a constructor where you pass the inv and the sign.
It also has a method that handles clickevents. - Create a manager class that inherits a Map<Inventory, LockGUI>
On inv click -> check if inv is in map -> if yes pass event to LockGUI instance
@cursive umbra EssentialsX
thanks, ill try that
can u helop e set it up
Uhm. No? What do you mean by "set it up". Go on the plugin page of essentials.
They have a whole wiki explaining every config line in detail.
i not good with this stuff and adding it
or whatever and y friends told me i have to set it up
i tried doing y self and vids
but i dont get it
thats why
Im sry but you will have to learn that. It might be hard in the begining but you wont improve without trying.
Asking others to do it for you is a shortcut and wont help you in the long run.
Ok do you know how to upload the plugin to your server?
How did you get the other plugins then?
the list from website
Just looked at minehut. Looks trash af... but ok its free.
Can i see the list of plugins that are accessible?
@grim halo what did you meant by It also has a method that handles clickevents
i didnt understand that exactly, sorry
what do you mean by method
its like a function?
im sorry im just tired and its been long since i used java
In your LockGUI you have a method called like:
public void handle(InventoryClickEvent event);
That handles the event.
Then from your Listener class (where you obvsly need an instance of your manager)
you get the gui and call the method something like:
gui.handl(event);
ooh
Yes functions in Java are called method
ok, thanks a lot
huge list
18 pages
Can anyone help me with installing Java 8 to a vps?
Yes. Huge list. We got it. Search for essentials and install it
@frigid ember What os?
i got that.
lol
What (os = operating system)
Ok. First update your apt list with
apt-get update
ok
EYE_OF_ENDER is the correct spigot name right
k
Wait do you have sudo?
yes
then its sudo apt-get update
okay
Wait
Err http://http.debian.net jessie-backports/main amd64 Packages
404 Not Found
Ign http://http.debian.net jessie-backports/main Translation-en_US
Ign http://http.debian.net jessie-backports/main Translation-en
W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/main/bin ary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
weird. ignore it
okay
sudo apt-get install oracle-java8-installer
E: Unable to locate package oracle-java8-installer
@wind dock service name should be the same name as the subdomain you assign for it. Protocol is TCP
Uhm wait... java 11 is the new default right?
yes
sudo apt update
What's the spigot name for ironbars
Same text
sudo apt install apt-transport-https ca-certificates wget dirmngr gnupg software-properties-common
ESSENTAILX?
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
@cursive umbra yes
says "OK"
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
okay
it didn't say anything
again sudo apt update
okay
sudo apt install adoptopenjdk-8-hotspot then check your version with java -version
_25x something?
openjdk version "1.8.0_262"
Yes now you got java 8
But why would you ever downgrade?
Cause Spigot Most Versions Only Work Java 8
And Bungee
Or It Wasn't Working For Me
Wait... my Spigot runs on Java 14.0.1 what version are you using?
kk
@grim halo now i'm wondering, when should i create the class and handle it?
i made the code for the class
if i created it whenever a player creates a sign it wouldn't matter, as the instance would be gone when the server stopped
You create one instance of your manager in the onEnable. The reference to this one instance is going to be passed to everything that needs to interact with
the inventories. The manager should handle the creation and destruction of the inventories.
on sign click -> manager.openLockGUI(Player player, Sign sign) -> internally that creates a new Inventory and puts it in the map with its wrapper <Inventory, LockGUI>
on inv click -> pass event to manager -> internally the manager checks if inv is in map -> if yes -> get the LockGUI and let it handle the event
on inv close -> call manager.destroy(Inventory inv) -> internally this should delete the inv from the map
Manager classes always have on single instance.
uhh small question - does PlayerTeleportEvent happen every time PlayerChangedWorldEvent happens?
No idea... write a quick listener and test it out ^^
@solar igloo yes it happens every time they change worlds
@cursive umbra
@grim halo The multiworld plugin works for us, Thank you so much
Whats wron now?
nothing
had a vps with 11 java
and want to uninstall
to downgrade
cause i cant do it when i have java already
Just delete the /usr/lib/jvm/jdk-11 something/ folder
Hey! I have 4 integers, how do I order them from highest to lowest
alr
Are the ints in some sort of collection?
No
You could do something with Integer.min(x, y) gets you the lowest of both.
Or Collection.sort(new ArrayList<>(ia, ib, ic, id))
rightio would that sort from highest to lowest?
not sure. But you can iterate incrementally or decrementally so it doestn rly mattert
You can start to iterate from each side of the list
You can slo just do this:
int[] arr = {13, 7, 6, 45, 21, 9, 101, 102};
Arrays.sort(arr);
Will sort you the array of ints
I need help
Wym everything?
java related
Its a vps i'm not sure u can do that
@grim halo can u help me?
root@<ip>:~# java -version
-bash: /usr/bin/java: No such file or directory```
I get that when i do java -version
when i do sudo apt install adoptopenjdk-8-hotspot it doesn't do anything
it says
Reading package lists... Done
Building dependency tree
Reading state information... Done
adoptopenjdk-8-hotspot is already the newest version (8u262-b10-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
You have java 8 installed. Whats the reason you want uninstall the other version?
It was 11
This is a different vps btw
but when i do java -version how come nothing shows up?
Wdym nothing shows up? You either get the version or "bash java command not found" or something like this
k
it like says
root@<ip>:~# java -version
-bash: /usr/bin/java: No such file or directory
Cant start my mc server up
Java isn't a thing
when i install it it doesn't install
No idea what this server went through but that happens if you install i386 java on a 64bit machine.
Im not sure i wanna touch that.
- uninstall everything java related.
- reinstall java 8
k
Or... wait
poor server
you can try one more thing
what?
sudo update-java-alternatives -a
awk: fatal: cannot open file `/usr/lib/jvm/*.jinfo' for reading (No such file or directory)
did you check if the directory exists?
why don't you get shared hosting or hire a sys admin?
If your server is small, it's more cost effective to just get shared hosting anyways (plus it saves all the hassle of managing the entire backend). If your server is already large, or it will use a lot of resources, then you should just hire a sys admin anyways
Well idk its my first time and i'm just trying things out
If it works Β―_(γ)_/Β―
I think its a good introduction for dedicated servers.
You have to start somewhere
That's true
Did you start over from scratch with a new instance?
What happens if my server looses connection to the database, does spigot have a query feature?
Or local caching?
which type of database?
Oh um what about my luck perms connected to my remote Maria DB server?
Oh okay
Any recommendations for remote databases?
Like to ensure thereβs no disconnection?
Can someone help me, if I stop my server it also hangs and will not be stopped
Stopping server Ignore any thread death message you see! Mc-Version 1.15.2
when i do
sudo apt install adoptopenjdk-8-hotspotit doesn't do anything
@frigid ember tbh best to use your distros openjdk where available
that message is not from spigot, must be your panel
How can I make a spigot fork and add player.getLevel()? How can I set the level of the player on join by getting it from a mysql database?
I'm like 99.9% sure you dont need a fork for this
I know
why would forking spigot be your first reaction
But that is just 1 of the things I need
wouldn't player.getLevel() get players xp?
It isnt
declaration: package: org.bukkit.entity, interface: Player
Yes but something else then
yeah
yeah there's literally getLevel already
player.getServerLevel()
wtf is serverLevel
he wants to make a levelling system
your experience level on a server?
why not just a hashmap
That's literally what a plugin is for ...
then what are you trying to do
add all my methods to spigot fork
why
why not
Because it's a terrible idea
^
why is it terrible?
You'd have to keep maintaining your fork every time there's an update
There's simply no need for it.
no
yeah
my server will always be 1.8
but why would you do this
ouch 1.8
its worse than doing it the proper way in every conceivablemanner
spigot is literally designed so you dont do this
okay guess not then
The use case you're describing is exactly why the plugin system exists...
why wouldn't it be
but again why
its easier for a network?? idk thats why i was going to do this but maybe im wrong
no, its much harder
but like once you have it you can easily do sutff like player.getLevel and player.addLevel
but those methods literally already exist
wait, does discord remove links from gifs now?
nice
okay thanks for your help
drowned
who lives in a pineapple under the sea"?
that guy
Hey guys, hoping somebody can help me here
I am having an issue with items' names not being displayed properly for no apparent reason and without any exceptions being thrown
Specifically the ItemMeta.setDisplayName(...) method does not seem to work properly or something and I cannot figure out the pattern of when it works and when it doesn't
Thats weird... dou you have any plugin intercepting your item packages?
did you remember to call setItemMeta
Have you made sure to set the item's meta? Have you made sure to set the item to the specific slot you're talking about?
I mean throw the code
This works:
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&r&e&l>&m= &e&l&m &r &r&7&lSwordΒ§f &r&e&l&m &r&e&l&m "));
This doesn't:
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&r&e&l>&m= &e&l&m &r &r&7&lSwordΒ§f &r&e&l&m &r&e&l&m =&e&l<"));
friendly reminder doing item.getItemMeta.setdisplayname wont actually set it
oh god thats a lot of formatting
I know I know, not my first rodeo, I am setting the item meta properly
holy shit thats alot ofc color codes but shouldnt be an issue
whats that though
Β§
No the number of color codes is not an issue, im trying to make a stylized item title
No that's not the issue, if you look at the output of the translateAlternateColorCodes(...) method, it just converts all those & to Β§ symbols anyhow
Β§f is the proper way to set color. &f -> translate alternate color just replaces the 'Β§' with '&'
No you're right, that was a copy-paste error on my part
anyhow it's not the reason it doesn't work
And the funny thing is in the chat both of them work
have you tested without it?
hmm what version
1.16.1
In 1.15.2 it all worked as expected
I updated to 1.16.1 and all my plugin's item titles just broke
might have something to do with the new color system
Whats the reason 'Β§' shouldnt exist in a name and why.
There have been already alot of threads about this issue
How do i make a forum post on the spiggot website?
@timber thorn try removing the f letter
might have something to do with the new color system
@vernal spruce I thought that too, but what speaks against that theory is
a) it works when I just leave out this tiny portion: "&e&l<" and
b) when I look at the item descriptor string the Name seems to be there correctly with "display:{Name:'{"extra":[{"bold":true,"italic":false,"underlined":false,"strikethrough":fa ... bla bla... "
and see what it does
right, they added hex colors to texts, maybe thats really why
remove the f or replace it and try again
remove the f or replace it and try again
@vernal spruce I just did, makes no difference
as the colorcode might pick it as a hex color
try changing the & to # because that worked for someone before
idk then never had an issue with the colors
Is DuckDuckGo down for you guys?
Someone know a working way to unregister an advancement? Bukkit.getUnsafe().removeAdvancement(key); does nothing
nope
I have problems searching
@timber thorn guess try getting it from a config
down for me
nope its down for me
see if getting it rather than hardcoding it works
probably cf again
yup
idk then never had an issue with the colors
@vernal spruce I don't know if it's something to do with the colors to be honest...
i mean i clearly didnt use 10 different color codes in 1 word..
it just looks wild in this raw format tbh
can I post pictures somewhere on the discord to show you?
verify ten post them here
No one? -> Someone know a working way to unregister an advancement? Bukkit.getUnsafe().removeAdvancement(key); does nothing. It register correctly with Bukkit.getUnsafe().loadAdvancement(..) and i can award it also. Basically i'm making a system to send custom message from here, it works, but i have to register different name for different messages. that's not the clearest thing to do
&e&l<&r&e&l&6 β¦ &r&e&l>&m= &e&l&m &r &7&lSword&f &r&e&l&m &r&e&l&m =&e&l<&r&e&l&6 β¦ &r&e&l>
This is what that colorcode amounts to
Nothing special or fancy
and it worked perfectly fine in item names in 1.15.2
Did you make sure your class is UTF8 encoded?
But not it just pretends that there is no custom item name there and calls the item by the localization specific name of the server.
Did you make sure your class is UTF8 encoded?
@grim halo It should be, yes. Idk how to verify but if you are referring to the β¦ symbol, it renders fine in the game as well...
One half works
if I add the other half, it breaks
so its not the star symbol then
and it doesn't seem to matter which half
maybe the double &e&l-- somehow?
what
So I know that the syntax of the code is not the issue
And it just doesn't make sense
hm
wtf
That is more than 35 π
ok so that source is fake, but why doesnt it work
hm
@sinful spire Where did you get that 35 limit from?
Oh also works in color btw
I really tested everything I could think of to be the cause but nothing makes sense
So the thing is that the NBT item descriptor has the correct and complete name saved, I really thing this has to do with parsing the item and displaying the name somehow
anyone know how to let the player walk on water without being glitchy?
Could somebody maybe try this line of code on one of their servers and see if/how that works?
It works perfectly fine for me...
anyone know how to set honeyLevel of a bee?
yeah
So, no one have or know a working alternative to Bukkit.getUnsafe().removeAdvancement(key); ? Or maybe i'm using it wrongly
seems maybe thats a problem
That should literally make no difference...
Maybe he has an older spigot version. Try updating
Oh ok... i used Paper -> works perfectly fine
switched to Spigot -> broken
No that makes no sense @sinful spire because the translate method returns a string. makes no difference if I save it beforehand or not
so seems like thats a spigot problem then 7smile7
yep
Well crap, yeah so it seems to be a spigot bug after all
What's the proper way to report it?
Never done a bugreport
i'll try it on CraftBukkit hah
i'll try it on CraftBukkit hah
@sinful spire Please do! β€οΈ
Ping md5 and yell at him. Post your code. He likes that
Who is md5?
Had the same thing...
@fleet crane Any idea why Bukkit.getUnsafe().removeAdvancement(key); doesn't unregister the advancement? Thanks
let's see
What do you mean who is md5? Its a cryptographic hash function.
What do you mean who is md5? Its an cryptographic hash function.
@grim halo How do you yell at a cryptographic hash function? π
Ping md5 and yell at him
No but who is md_5? A spigot dev?
hey@md_5#0001 who are you
no need to spam ping him
rofl that's why I didn't want to ping him in the first place
i didnt ping him
No need to bother good folk with my earthly spigot bugs and problems
The proper way is posting a jira bug report
Hiii, i have a little problem on Eclipse, i wanna use the AutoCompletion but it doesnt works, maybe a problem with the spigot javadoc, if someone can help me π π
Hiii, i have a little problem on Eclipse, i wanna use the AutoCompletion but it doesnt works, maybe a problem with the spigot javadoc, if someone can help me π π
@kindred bay What does it do instead of working? What's happening exactly?
Eclipse doesn't offer me anything π€· @timber thorn
Eclipse doesn't offer me anything π€· @timber thorn
@kindred bay That sentence has more truth in it than you know
@kindred bay Check out the settings in Window->Preferences->Java->Editor->Content Assist->Advanced
What you probably want are the Template Proposals
@kindred bay That sentence has more truth in it than you know
@grim halo Lol π Are you using CLion?
CLion? Only when i do embedded stuff. C/C++
No what's the jetbrains IDE for Java called?
@timber thorn marry me
I seem to have forgot the name
IntelliJ lol
IntelliJ ?
@timber thorn marry me
@kindred bay Buy me a drink first then we can talk
Yes that's it xDD
I remember I tried switching to IntelliJ from Eclipse and I loved it, absolutely prefer it to Eclipse.
But I could not get hotswapping to work
Is there any sources or at least a way to look at the spigot API source code?
@proper cairn Run BuildTools. It installs everything in your maven repo
Using buildtools
Im derping...
Yeah so I love IntelliJ but I could not get hotswapping to work and with some Ant builders in eclipse, you can start the spigot server from within eclipse and hotswap your code so you don't have to restart the server any time you change something in your classes. Could not get that to work in IntelliJ so I stuck with Eclipse
I mean it's not that bad to be honest, just doesn't look as good
I mean someone else also had some issues https://www.spigotmc.org/threads/intellij-live-debug-run-your-server-inside-the-ide.364782/
I love intellijs autocompletion and plugins. Also version control integration is great... and maven... and there is mcdev for intellij...
IntelliJ is a wet dream
What do i run specifically with build tools? I really dont work with Maven
I mean someone else also had some issues https://www.spigotmc.org/threads/intellij-live-debug-run-your-server-inside-the-ide.364782/
@bold anchor Ooof don't do me like that. I guess I gotta try and get IntelliJ to work again...
Thanks for the link though
i'll try it on CraftBukkit hah
@sinful spire Did it work on CraftBukkit by any chance?
Right, ty anyhow. I created a jira bugreport π
hi have this book https://prnt.sc/tk3s8f and this code: https://paste.helpch.at/sibepimiwe.cpp . In text component is set Hover and Click event which dont work, anyone knows why?
i believe TextComponent#getText() returns a string but idk if its a json string or a normal string
BookMeta#setPages sets the pages as you enter them. In text form
and how can i solve it?
declaration: package: org.bukkit.inventory.meta, interface: BookMeta, class: Spigot
yes
I look at it before
but idk how to set that into it with text without hover event and with
You've already got the TextComponent - just pass that
You'll have to provide all the lines as components, of course
i want one part without text compenent and one with
yes
i know
but i dont want that
That's the only way you can do it.
And there's no difference between simple text and simple text simply wrapped into a TextComponent
They get displayed exactly the same way
so i need to create second textcomponent without hever and click event?
You'll need one for each line, yes
No, you can simply pass separate instances
(arg1, arg2)
i dont undersatnd
please don't make it exponential