Skip to content
This repository was archived by the owner on Jul 20, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
89a9954
Update shop link to stratus buycraft
ShinyDialga Apr 1, 2017
8a3269c
Fix error when opening player inventories
Electroid Apr 1, 2017
e03f3a9
Fix edge case errors with mutations
Electroid Apr 3, 2017
3e627fa
Add tokens and add shiny's gui library
cswhite2000 May 8, 2017
8220e90
Merge pull request #10 from cswhite2000/tokens
cswhite2000 May 15, 2017
dafc229
Add animation module
ShinyDialga May 16, 2017
c0202b4
Add MVP module
ShinyDialga May 16, 2017
4f3e25a
Make polls look better
cswhite2000 May 20, 2017
2fc7173
Merge pull request #12 from StratusNetwork/polls
cswhite2000 May 21, 2017
eab711f
Fix Rage mutation, allow players to be forced in ffa, prevent map tok…
cswhite2000 May 26, 2017
917f0ac
Add main menu, update mvp, and minor projectile changes
ShinyDialga May 28, 2017
d6f2b5a
add stats command, add tab complete to poll next
cswhite2000 May 29, 2017
d9cc170
fix model commands, fix stats command description, remove lore from t…
cswhite2000 May 31, 2017
eeef5c6
Fix null pointer exception when players die on TDM maps
cswhite2000 Jun 4, 2017
be0853f
Fix various mutations
cswhite2000 Jun 5, 2017
9da64d8
Add the bread mutation
cswhite2000 Jun 6, 2017
3d64b00
Target mutations bias players with lower health
Electroid Jun 6, 2017
34993f0
Revert Bomber and Equestrian mutations
cswhite2000 Jun 6, 2017
d7d9ac7
Add blitz command
Electroid Jun 6, 2017
7aa9926
Add way to disable blitz
Electroid Jun 6, 2017
714eaaf
Edit Bread Mutation
cswhite2000 Jun 6, 2017
ed9d488
Fix entity mutation collisions
Electroid Jun 6, 2017
1243973
Add /sudo command
Electroid Jun 7, 2017
82edbf2
Allow players to join team blitz mid-match
Electroid Jun 7, 2017
03a38d8
Remove special settings dependency
Electroid Jun 8, 2017
c732c5d
Add bread mutation to polls
cswhite2000 Jun 9, 2017
c5630da
add boat mutation
cswhite2000 Jun 9, 2017
cfdd1ed
add flying boat module
cswhite2000 Jun 10, 2017
bcd1993
Edit MVP calculations
cswhite2000 Jun 10, 2017
46f0506
Change lobby branding to stratus
cswhite2000 Jun 11, 2017
4a74697
Add potion bread
cswhite2000 Jun 12, 2017
85721f9
Add tools mutation
cswhite2000 Jun 13, 2017
5eca38b
Edit mutations and add token and poll options to config
cswhite2000 Jun 15, 2017
d3dd613
Give players who switch teams worse bread
cswhite2000 Jun 15, 2017
0a994a7
add coinflip command, add mvp to config, prevent maps with too few pl…
cswhite2000 Jun 17, 2017
f215769
add debug commands and fix the navigator
cswhite2000 Jun 19, 2017
0825692
make punishment messages lowercase
cswhite2000 Jun 19, 2017
0141d4c
fix mvp and tokens revealing nicks
cswhite2000 Jun 19, 2017
c9e6ad4
Add Chest Mutation (#15)
PotatoStealer Jun 22, 2017
8b1962a
Revert "Add Chest Mutation (#15)"
Electroid Jun 22, 2017
04828d0
fix misspelling
cswhite2000 Jun 25, 2017
65a1200
Add local nexus repositories
Electroid Jun 26, 2017
82f9659
Add nexus 8081 port
Electroid Jun 26, 2017
11e912c
Remove OCN deployment
Electroid Jun 26, 2017
d13dfb5
Remove local build repository
Electroid Jun 26, 2017
f7006cf
Remove local maven repos for now
Electroid Jun 26, 2017
a709aee
fix messages
cswhite2000 Jun 27, 2017
46d335b
Add togglegravity command
cswhite2000 Jun 27, 2017
ae8a175
Fix tokens not being removed from the player when a poll succeeds if …
cswhite2000 Jun 28, 2017
bcc44fa
Allow projectiles to apply kits when they hit players
cswhite2000 Jun 28, 2017
9380f72
Allow kits to be applied when hitting players
cswhite2000 Jun 29, 2017
0f66415
fix team-switch kit not always switching teams
cswhite2000 Jul 2, 2017
ddbc7c7
Add more legacy player support
Electroid Jul 5, 2017
0b3c51e
Update to 1.12
ShinyDialga Jun 22, 2017
2bae307
Fix incorrect POM versions
Electroid Jul 6, 2017
f5ea1e9
add playerversion command
cswhite2000 Jul 6, 2017
84fbd5a
shorten percentages
cswhite2000 Jul 6, 2017
5853012
Fix NPE with 1.12 crafting
Electroid Jul 7, 2017
e23914f
Make titles and hotbars more visible
Electroid Jul 7, 2017
6e666e4
Fix glitchy 1.7 respawning mid-air
Electroid Jul 7, 2017
9612858
Add 1.7 and 1.8 boss bar support
Electroid Jul 7, 2017
c918067
make stale punishments gray
cswhite2000 Jul 7, 2017
b880857
add alias for playerversion command
cswhite2000 Jul 8, 2017
2068aeb
Log player versions (#22)
cswhite2000 Jul 9, 2017
2535386
fix playerversion command flag
cswhite2000 Jul 9, 2017
52c82a8
Add legacy CTF support
Electroid Jul 9, 2017
5702406
edit playerversion logging
cswhite2000 Jul 11, 2017
aa6b01e
Add more versions to MinecraftVersion
cswhite2000 Jul 12, 2017
602ef19
Capitalize blitz inventory message
cswhite2000 Jul 13, 2017
99628e5
Allow ops to bypass poll restrictions
cswhite2000 Jul 14, 2017
416c555
fix amqp commands
cswhite2000 Jul 14, 2017
a3ddeaa
Fix memmory leaks
cswhite2000 Jul 17, 2017
64b1919
Fix servers not responding to SIGTERM and SIGINT
Electroid Jul 25, 2017
1d0adf7
Add random skin to nicked players
Electroid Jul 25, 2017
ddf4eb5
add flair config options
cswhite2000 Jul 25, 2017
30cee03
Change flair config keys
Electroid Jul 26, 2017
7368037
Update config flair keys in default config
cswhite2000 Jul 26, 2017
50ef439
Report external ip address to api
Electroid Jul 27, 2017
55aacbd
Revert "fix amqp commands"
cswhite2000 Jul 27, 2017
0caea52
Store rotation state in the database
Electroid Jul 28, 2017
99ae043
More robust stop signal configuration
Electroid Jul 28, 2017
c48a5d1
Disable the crafting module
cswhite2000 Jul 29, 2017
874b8a1
Prevent Older clients from entering boats
cswhite2000 Jul 29, 2017
53e16c4
Prevent non player entities from entering vehicles
cswhite2000 Jul 31, 2017
a08b8e1
Change rotation change message & enhance logic (#27)
andrgorr Aug 1, 2017
c66a2de
fix custom crafting
cswhite2000 Aug 1, 2017
5c43ba0
Split game settings into submenus, enhance setting GUI
andrgorr Aug 1, 2017
be006d0
IntelliJ IDEA Cleanup: Remove unused imports, migration aids...
andrgorr Aug 2, 2017
8c9ec25
Some improvements to the settings menu
andrgorr Aug 2, 2017
7c906bd
Revert "IntelliJ IDEA Cleanup: Remove unused imports, migration aids..."
andrgorr Aug 2, 2017
1e702ac
Update SettingsTypeInterface.java
Electroid Aug 2, 2017
e52818d
Add localized /join commands temporarily
Palmidence Aug 5, 2017
9ea38d8
Add option to not publish ip
Electroid Aug 8, 2017
6ccd95c
Only broadcast off record punishments to local server
Electroid Aug 9, 2017
7e330b7
Off record servers can only punish locally
Electroid Aug 9, 2017
53fd64c
Fix settings menu translations, remove unused imports (#34)
andrgorr Aug 13, 2017
0eebdee
Support for website revamp
Electroid Aug 15, 2017
5375c4f
Fix ip reporting
Electroid Aug 27, 2017
e4bed71
Allow console to let player change death screen
Electroid Aug 27, 2017
1030c2d
Allow group joins without an expiration
Electroid Aug 28, 2017
62cd4a9
update to 1.12.1
cswhite2000 Aug 25, 2017
886368f
fix compilation issues
cswhite2000 Sep 6, 2017
44a43c1
Add new minecraft version enum
Electroid Sep 10, 2017
32dbb08
Nerf the tools mutation
cswhite2000 Sep 11, 2017
d90acb6
Don't attempt to display empty flairs
cswhite2000 Sep 17, 2017
d2ed745
edit permission node for the playerversion command
cswhite2000 Aug 28, 2017
341a55e
update to 1.12.2
cswhite2000 Sep 25, 2017
e2ed868
fix standalone pgm
cswhite2000 Oct 13, 2017
6a43a30
Update Commons.properties
jexeI Oct 13, 2017
4a5dcfe
Fix stats command from exposing nicknames
PotatoStealer Oct 25, 2017
a07f30e
add headless horseman gizmo (#43)
PotatoStealer Oct 26, 2017
630847d
Prevent entity creation from bomber mutation
Palmidence Nov 6, 2017
9600ab6
Add cloud build config
Electroid Nov 25, 2017
29a3e34
Fix NPE for punishments from the website
Electroid Nov 26, 2017
5f677c6
Fix missing parenthesis
Electroid Nov 26, 2017
8a41fe5
Pull cached versions of base and shared docker images
Electroid Nov 26, 2017
4f43ffe
Add github token to cloud builds
Electroid Nov 27, 2017
8fa0cab
Minor improvements to death screen messages
Matic0B Dec 3, 2017
3a2cfa7
Fix ticket booth commands clashing with leave commands
PotatoStealer Dec 3, 2017
3744813
Allow maps to be filtered by author or gamemode
PotatoStealer Dec 3, 2017
f2ed36b
Don't dynamically change rotations when a mutation is queued
DirkyJerky Dec 4, 2017
3311a4a
Exposed touched objectives when round ends
DirkyJerky Dec 4, 2017
ac776f4
Add server ip to sidebar
Electroid Dec 4, 2017
894514e
Fix tab list not rendering from injection
Electroid Dec 5, 2017
9d4528b
Change cloud build to include maven and docker process
Electroid Dec 6, 2017
f71cc90
Move docker deploy out of the build config
Electroid Dec 6, 2017
087b690
set Gliding to false in MatchPlayer reset
cswhite2000 Dec 7, 2017
c366b28
Fix exempt report message
PotatoStealer Dec 7, 2017
0f8af68
Fix dynamic rotations not working
Electroid Dec 9, 2017
de6db0c
Make the bomber mutation destroy terrain again
Electroid Dec 11, 2017
f3fcbba
Allow build organizations to be defined in XML
Palmidence Aug 21, 2017
6039d54
Revert "Allow build organizations to be defined in XML"
Palmidence Aug 21, 2017
406804e
Remove broken mutation check in dynamic rotations
Electroid Dec 21, 2017
f6aa12b
Fetch tab list ip from the API
PotatoStealer Dec 24, 2017
5eb88ae
Initial Payload Release
ShinyDialga Dec 27, 2017
c31401e
Temporary location fix
ShinyDialga Dec 30, 2017
5de12a4
Simplify cloud builds
Electroid Dec 30, 2017
068489d
Restore mutation dynamic rotation check
Electroid Dec 30, 2017
9f73d2a
Refactor control point logic into a controllable goal
Electroid Dec 30, 2017
eb6c3ac
Add checkpoints for assault and fix temporary location fix
ShinyDialga Dec 30, 2017
6b88ce7
Make Payload minecart a marker armor stand
Electroid Dec 30, 2017
bb52fa1
Make neutral state of Payloads to be default false
Electroid Dec 30, 2017
d736ecd
Fix armor stand location for payloads
Electroid Dec 30, 2017
aca0c38
Fix non-friendly checkpoint maps
ShinyDialga Dec 30, 2017
6b38189
Allow controllables to define a rollback to neutral rate
Electroid Dec 30, 2017
4cd9787
Actually fix friendly checkpoints
ShinyDialga Dec 31, 2017
af58ad7
Allow filtering of sudo commands by permission node
cswhite2000 Dec 31, 2017
1db09ae
Shorten the chat prefix for observers
Electroid Dec 31, 2017
2d73675
Do not render flairs in staff list
Electroid Dec 31, 2017
e5c058b
Change build file to use latest infrastructure repo
Electroid Dec 31, 2017
d8fc07e
Add Payload gamemode
Matic0B Dec 30, 2017
9090ad2
Remove prefixes from all team chats
Electroid Dec 31, 2017
5cfd94c
Fix reference error of queued build
Electroid Dec 31, 2017
d5b9acf
Add special git build steps to clone into existing directory
Electroid Dec 31, 2017
7e1ee95
Fix incorrect argument
Electroid Dec 31, 2017
5218716
Change working directory of queued build
Electroid Dec 31, 2017
e69aa47
Add '(Team)' chat prefix before team chats
Electroid Dec 31, 2017
c09b97a
Gray team prefixes
Electroid Dec 31, 2017
33156de
Lower height of payload particles and add particle beam to it
ShinyDialga Jan 2, 2018
e3cd39a
Add a flag to allow objective modes to be advanced (#59)
PotatoStealer Jan 4, 2018
a402c02
Add a toggleable report sound (#64)
cswhite2000 Jan 4, 2018
ab1acb5
Slightly change the report sound
cswhite2000 Jan 6, 2018
d8dd7ee
Merge pull request #65 from StratusNetwork/cswhite2000-patch-2
ItzaMeLuigi Jan 6, 2018
1276a6d
Fix ReportAnnouncer double to float conversion (#66)
cswhite2000 Jan 6, 2018
7b32649
Only show silent punishments to staff (#68)
cswhite2000 Jan 9, 2018
4f095f5
Halloween gizmo fixes (#53)
PotatoStealer Jan 12, 2018
0ce2f27
Fix whispers not being delivered in some cases
cswhite2000 Jan 12, 2018
2d86703
Make team chat gray (#72)
amactus Jan 14, 2018
de304a7
Change Team prefix color to team color and change chat color for team
cswhite2000 Jan 14, 2018
2fb335f
Add "/kit(s)" alias to class commands
Matic0B Feb 8, 2018
354723b
Let staff in spectator mode mirror player's view
cswhite2000 Feb 12, 2018
47a0c13
Add new death screens
cswhite2000 Feb 18, 2018
b842deb
Don't fail broadcasts on missing translation file
cswhite2000 Feb 21, 2018
1d7e83e
Add an optional delay to broadcast schedules
cswhite2000 Feb 24, 2018
0539891
Add a beacon module with particles
cswhite2000 Feb 27, 2018
2067e56
Add locales command
cswhite2000 Feb 27, 2018
3adaaba
Readd trial rank handling code
cswhite2000 Feb 27, 2018
ffaab41
Fix incorrect reference to payload gamemode
PotatoStealer Feb 27, 2018
5c17281
Fix stats command revealing nicknames
PotatoStealer Feb 27, 2018
96013eb
Fix incorrect apostrophe in death screen
cswhite2000 Mar 15, 2018
1c6c6f1
Implement matchstats command (#77)
PotatoStealer Apr 4, 2018
54e1612
Parse rotations from YML files
Electroid Apr 29, 2018
64512b5
Tweak Explosive mutation
PotatoStealer May 13, 2018
a147b91
Remove fire disable from explosive mutation
Electroid May 13, 2018
ac0c821
Update cloud build script
Electroid May 18, 2018
44481e4
Allow cross-server chat messages
Electroid May 22, 2018
cec4d5f
Use fancy name style for channel messages
Electroid May 22, 2018
f52b8a7
Simplify admin chat permission node
Electroid May 22, 2018
1eaae36
Fix admin chat permission node being defined twice
Electroid May 22, 2018
9b59cc0
Fix team chat from being reset after cycle
Electroid May 22, 2018
06fd775
Only show admin chat server when message is remote
Electroid May 22, 2018
7f26cf9
Fix OP axes for tools mutation
ShinyDialga Jun 12, 2018
8150624
Fix hotbar message spam and translations
ShinyDialga Jul 19, 2018
3492e9a
Fix typo preventing mods from seeing team chat
ShinyDialga Jul 25, 2018
33c269d
Minor legacy flag fixes and fix extra quotes in chat
ShinyDialga Jul 27, 2018
d0d0973
Make broadcast permissions default to false
cswhite2000 Aug 10, 2018
a4c478f
Fix staff in observers not being able to read team chat
cswhite2000 Aug 10, 2018
f4d182d
Make the trophy command permissions default to false
cswhite2000 Aug 10, 2018
220f11c
Remove zombie hitboxes due to buggy behavior
ShinyDialga Oct 12, 2018
530885f
Add new custom death messages
CrazyisCreeps Nov 20, 2018
f3f74b5
Downstream changes (#100)
AustinLMayes Nov 20, 2018
c57a9d3
Add "prox" as an alias for proximity command (#94)
MarcRoizman Nov 21, 2018
ddfd2f9
Change adminchat freeze message to match format (#92)
eudaldca Nov 21, 2018
67f3e14
Prevent empty buttons from refreshing the inventory. (#88)
Pugzy Nov 21, 2018
72e656e
Prevent flags from dropping as items. (#87)
Pugzy Nov 21, 2018
1450849
Fix matchstats displaying wrongly (#84)
PotatoStealer Nov 21, 2018
6cf7610
Make map context a soft reference, and keep a persistent context (#79)
Pablete1234 Nov 21, 2018
c80830b
Remove death messages that were too long (#101)
CrazyisCreeps Nov 21, 2018
df3bd6b
Make poll votes clickable
AustinLMayes Aug 19, 2018
baf395c
Fix poll status messages not showing
cswhite2000 Aug 27, 2018
0a04adb
Fix headless horseman
AustinLMayes Sep 20, 2018
0250c27
Add ghost gizmo
AustinLMayes Sep 20, 2018
36bacfe
Generify HalloweenGizmo, add global purchase perm
AustinLMayes Sep 20, 2018
73bfea9
Fix cloud builds
AustinLMayes Nov 21, 2018
568ce26
Fix outdated cloud build command
AustinLMayes Nov 21, 2018
93167aa
Fix /stats revealing identities
AustinLMayes Nov 26, 2018
2f819fd
Fix ChatAnnouncer w/ no backend
AustinLMayes Nov 26, 2018
bb6d4a7
Actually take into account the default value given to findPlayer
AustinLMayes Nov 27, 2018
12fde3c
Fix highground death message
AustinLMayes Nov 28, 2018
deaac28
Don't expose custom death screens for nicked players
AustinLMayes Nov 28, 2018
de85f9f
Readd aliases for global chat
cswhite2000 Dec 8, 2018
f57fadd
Ignore empty chat messages (#5)
cswhite2000 Dec 17, 2018
6073ddc
Honor admin chat and reports config (#7)
AustinLMayes Dec 23, 2018
96c240a
Add Christmas tree
AustinLMayes Dec 24, 2018
f61c78c
Change tree to coal
AustinLMayes Dec 24, 2018
807a013
Fix Christmas gizmo purchase
AustinLMayes Dec 24, 2018
152401f
Tree is free until the 26th!
AustinLMayes Dec 24, 2018
63b3ac4
Add 30 second cooldown to Christmas gizmo
AustinLMayes Dec 25, 2018
ae0ea7e
Capitalize string used in getRotation (#103)
randykinne Jan 4, 2019
aa46ee6
Implement server requests (#8)
AustinLMayes Jan 20, 2019
a02be9a
Fix Dynamic Rotations
ItzaMeLuigi Mar 2, 2019
d132e43
Switch to maven official builder
flareprojectbot Mar 22, 2019
9a07288
Change combat log event priority
flareprojectbot Apr 22, 2019
dab6193
Don't allow observers to be frozen
AustinLMayes Apr 24, 2019
7ed61a0
Broadcast setnexts to admin chat
AustinLMayes Apr 24, 2019
e39fc6e
Add server requesting with custom names
cswhite2000 Mar 27, 2019
fa3ddd8
Use prefix for string messages in SimpleChannel
AustinLMayes Apr 24, 2019
feae699
Improve freeze observer excemption
AustinLMayes Apr 24, 2019
a48abdb
Changed required players in game for MVP from 10 to 8. (#105)
sharkskill Apr 29, 2019
8a0e315
Merge branch 'master' of github.com:StratusNetwork/projectares
AustinLMayes May 18, 2019
8f611cd
Drop flags on match end
AustinLMayes May 19, 2019
262b813
Kick players who fail to respawn
AustinLMayes May 31, 2019
2011aac
Default wool pre touch metric to off
AustinLMayes Jun 1, 2019
7975674
Allow explosions, blood, and arrow trails to be turned off globally
AustinLMayes Jun 5, 2019
f1661b3
Add a special command for a soecial person
AustinLMayes Jun 10, 2019
c4b2257
Make block 36 removsl configurable
AustinLMayes Jun 13, 2019
45d0ff4
Add minumum version requirements to mutations
AustinLMayes Jun 19, 2019
1605a4d
Only allow stealth for 1.9+ games
AustinLMayes Jul 4, 2019
cfcb383
Replace underscores with u
cswhite2000 Jul 8, 2019
bb25a90
Catch classification errors early
AustinLMayes Aug 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion API/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>tc.oc</groupId>
<artifactId>api-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.11-SNAPSHOT</version>
<version>1.12.2-SNAPSHOT</version>
</parent>

<artifactId>api</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions API/api/src/main/java/tc/oc/api/ApiManifest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package tc.oc.api;

import tc.oc.api.chat.ChatModelManifest;
import tc.oc.api.document.DocumentsManifest;
import tc.oc.api.engagement.EngagementModelManifest;
import tc.oc.api.friendships.FriendshipModelManifest;
import tc.oc.api.games.GameModelManifest;
import tc.oc.api.http.HttpManifest;
import tc.oc.api.maps.MapModelManifest;
Expand Down Expand Up @@ -44,5 +46,7 @@ protected void configure() {
install(new WhisperModelManifest());
install(new TrophyModelManifest());
install(new TournamentModelManifest());
install(new FriendshipModelManifest());
install(new ChatModelManifest());
}
}
16 changes: 16 additions & 0 deletions API/api/src/main/java/tc/oc/api/chat/ChatModelManifest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package tc.oc.api.chat;

import tc.oc.api.docs.Chat;
import tc.oc.api.docs.virtual.ChatDoc;
import tc.oc.api.model.ModelBinders;
import tc.oc.commons.core.inject.HybridManifest;

public class ChatModelManifest extends HybridManifest implements ModelBinders {

@Override
protected void configure() {
bindModel(Chat.class, ChatDoc.Partial.class, model -> {
model.bindDefaultService().to(model.nullService());
});
}
}
7 changes: 7 additions & 0 deletions API/api/src/main/java/tc/oc/api/docs/Chat.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tc.oc.api.docs;

import tc.oc.api.annotations.Serialize;
import tc.oc.api.docs.virtual.ChatDoc;

@Serialize
public interface Chat extends ChatDoc.Complete {}
5 changes: 5 additions & 0 deletions API/api/src/main/java/tc/oc/api/docs/Friendship.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package tc.oc.api.docs;

import tc.oc.api.docs.virtual.FriendshipDoc;

public interface Friendship extends FriendshipDoc.Complete {}
52 changes: 52 additions & 0 deletions API/api/src/main/java/tc/oc/api/docs/virtual/ChatDoc.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package tc.oc.api.docs.virtual;

import tc.oc.api.annotations.Serialize;
import tc.oc.api.docs.PlayerId;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.time.Instant;

public interface ChatDoc {
interface Partial extends PartialModel {}

@Serialize
interface Base extends Model, Partial {
@Nonnull String message();
@Nonnull String server_id();
@Nullable String match_id();
@Nonnull Type type();
@Nonnull Instant sent_at();
@Nullable Broadcast broadcast();
}

@Serialize
interface Broadcast extends Partial {
@Nonnull Destination destination();
@Nullable String id();
}

@Serialize
interface Creation extends Base {
@Nullable String sender_id();
}

@Serialize
interface Complete extends Base {
@Nullable PlayerId sender();
}

enum Type {
TEAM(true), SERVER(true), ADMIN(false), BROADCAST(false);

public boolean batchUpdate;

Type(boolean batchUpdate) {
this.batchUpdate = batchUpdate;
}
}

enum Destination {
SERVER, FAMILY, GAME, NETWORK, GLOBAL
}
}
23 changes: 23 additions & 0 deletions API/api/src/main/java/tc/oc/api/docs/virtual/FriendshipDoc.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package tc.oc.api.docs.virtual;

import tc.oc.api.annotations.Serialize;
import tc.oc.api.docs.PlayerId;

import javax.annotation.Nullable;
import java.time.Instant;

public interface FriendshipDoc {

interface Partial extends PartialModel {}

@Serialize
interface Complete extends Model, Partial {
Instant sent_date();
@Nullable Instant decision_date();
PlayerId friender();
PlayerId friended();
boolean undecided();
boolean accepted();
boolean rejected();
}
}
2 changes: 1 addition & 1 deletion API/api/src/main/java/tc/oc/api/docs/virtual/MapDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ enum Edition {
enum Genre { OBJECTIVES, DEATHMATCH, OTHER }
Genre genre();

enum Gamemode { tdm, ctw, ctf, dtc, dtm, ad, koth, blitz, rage, scorebox, arcade, gs, ffa, mixed, skywars, survival }
enum Gamemode { tdm, ctw, ctf, dtc, dtm, ad, koth, blitz, rage, scorebox, arcade, gs, ffa, mixed, skywars, survival, payload }
Set<Gamemode> gamemode();

List<Team> teams();
Expand Down
6 changes: 1 addition & 5 deletions API/api/src/main/java/tc/oc/api/docs/virtual/MatchDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ public interface MatchDoc extends Model {
Collection<String> winning_team_ids();
Collection<String> winning_user_ids();

enum Mutation {
BLITZ, UHC, EXPLOSIVES, NO_FALL, MOBS, STRENGTH, DOUBLE_JUMP, INVISIBILITY, LIGHTNING, RAGE, ELYTRA;
}

Set<Mutation> mutations();
Set<String> mutations();

@Serialize
interface Team extends MapDoc.Team, CompetitorDoc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ interface Base extends Model, Partial {
boolean silent();
boolean automatic();
boolean active();
boolean off_record();
}

@Serialize
interface Creation extends Base {
@Nullable String punisher_id();
@Nullable String punished_id();
@Nullable Type type();
boolean off_record();
}

@Serialize
Expand Down
27 changes: 22 additions & 5 deletions API/api/src/main/java/tc/oc/api/docs/virtual/ServerDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ interface BungeeName extends Partial {
}

@Serialize
interface CurrentPort extends Partial {
interface Port extends Partial {
Integer current_port();
}

@Serialize
interface Ip extends Partial {
String ip();
}

@Serialize
interface Online extends Partial {
boolean online();
Expand Down Expand Up @@ -95,7 +100,7 @@ interface Visible extends Partial {
* Startup info sent to the API
*/
@Serialize
interface Startup extends Online, CurrentPort {
interface Startup extends Online, Port {
@Nullable DeployInfo deploy_info();
Map<String, String> plugin_versions();
Set<Integer> protocol_versions();
Expand All @@ -105,7 +110,8 @@ interface Startup extends Online, CurrentPort {
* Startup info received from the API
*/
@Serialize
interface Configuration extends Partial {
interface Configuration extends Rotations {
String domain();
String settings_profile();
Map<UUID, String> operators();
@Nullable Team team();
Expand All @@ -116,10 +122,10 @@ interface Configuration extends Partial {
Visibility startup_visibility();
boolean whitelist_enabled();
boolean waiting_room();

@Nullable String resource_pack_url();
@Nullable String resource_pack_sha1();
boolean resource_pack_fast_update();
@Nullable String cross_server_profile();
}

@Serialize
Expand All @@ -138,7 +144,18 @@ interface MatchStatus extends Partial {

@Serialize
interface Mutation extends Partial {
Set<MatchDoc.Mutation> queued_mutations();
Set<String> queued_mutations();
}

@Serialize
interface Rotations extends Partial {
List<Rotation> rotations();
}

@Serialize
interface Rotation extends Document {
String name();
String next_map_id();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Partial extends PartialModel {}
interface Complete extends Model, Partial {
String family_id();
String server_id();
@Nullable String version();
PlayerId user();
@Nullable String nickname();
@Nullable String nickname_lower();
Expand Down
28 changes: 26 additions & 2 deletions API/api/src/main/java/tc/oc/api/docs/virtual/UserDoc.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tc.oc.api.docs.virtual;

import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -44,6 +43,11 @@ interface Trophies extends Partial {
List<String> trophy_ids();
}

@Serialize
interface Channel extends Partial {
@Nonnull ChatDoc.Type chat_channel();
}

interface License {

@Serialize
Expand Down Expand Up @@ -80,10 +84,14 @@ interface Complete extends Request, Grant {}
* Stuff we get from the API on login, and keep around for plugins to use
*/
@Serialize
interface Login extends Identity, Locale, Trophies, License.Complete {
interface Login extends Identity, Locale, Trophies, DefaultServer, FriendTokens, DeathScreen, License.Complete, Channel {
int raindrops();
int maptokens();
int mutationtokens();
String mc_last_sign_in_ip();
@Nullable Date trial_expires_at();
@Nullable Instant nickname_updated_at();
Map<String, Map<String, Map<String, Object>>> stats_value();
Map<String, Map<String, Boolean>> mc_permissions_by_realm();
Map<String, Map<String, String>> mc_settings_by_profile();
Map<String, String> classes();
Expand All @@ -110,4 +118,20 @@ enum ResourcePackStatus {
interface ResourcePackResponse extends Partial {
UserDoc.ResourcePackStatus resource_pack_status();
}

@Serialize
interface DefaultServer extends Partial {
@Nullable String default_server_id();
}

@Serialize
interface DeathScreen extends Partial {
String death_screen();
}

@Serialize
interface FriendTokens extends Partial {
int friend_tokens_limit();
int friend_tokens_concurrent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package tc.oc.api.friendships;

import com.google.inject.multibindings.OptionalBinder;
import tc.oc.api.docs.Friendship;
import tc.oc.api.docs.virtual.FriendshipDoc;
import tc.oc.api.model.ModelBinders;
import tc.oc.commons.core.inject.HybridManifest;

public class FriendshipModelManifest extends HybridManifest implements ModelBinders {

@Override
protected void configure() {
bindModel(Friendship.class, FriendshipDoc.Partial.class, model -> {
model.bindService().to(FriendshipService.class);
});

OptionalBinder.newOptionalBinder(publicBinder(), FriendshipService.class)
.setDefault().to(NullFriendshipService.class);
}
}
19 changes: 19 additions & 0 deletions API/api/src/main/java/tc/oc/api/friendships/FriendshipRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package tc.oc.api.friendships;

import tc.oc.api.annotations.Serialize;
import tc.oc.api.docs.virtual.Document;

import javax.annotation.Nullable;

@Serialize
public interface FriendshipRequest extends Document {
String friender_id();
@Nullable String friended_id();

static FriendshipRequest create(String friender_id, @Nullable String friended_id) {
return new FriendshipRequest() {
public String friender_id() { return friender_id; }
public String friended_id() { return friended_id; }
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package tc.oc.api.friendships;

import tc.oc.api.annotations.Serialize;
import tc.oc.api.docs.Friendship;
import tc.oc.api.docs.virtual.Document;

import javax.annotation.Nullable;
import java.util.List;

@Serialize
public interface FriendshipResponse extends Document {
boolean success();
@Nullable String error();
@Nullable List<Friendship> friendships();
}
16 changes: 16 additions & 0 deletions API/api/src/main/java/tc/oc/api/friendships/FriendshipService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package tc.oc.api.friendships;

import com.google.common.util.concurrent.ListenableFuture;
import tc.oc.api.docs.Friendship;
import tc.oc.api.docs.virtual.FriendshipDoc;
import tc.oc.api.model.ModelService;

public interface FriendshipService extends ModelService<Friendship, FriendshipDoc.Partial> {

ListenableFuture<FriendshipResponse> create(FriendshipRequest request);

ListenableFuture<FriendshipResponse> destroy(FriendshipRequest request);

ListenableFuture<FriendshipResponse> list(FriendshipRequest request);

}
Loading